Zakelly commented on code in PR #26640:
URL: https://github.com/apache/flink/pull/26640#discussion_r2177438302
##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/state/rocksdb/RocksDBStateUploader.java:
##########
@@ -180,6 +195,31 @@ private HandleAndLocalPath uploadLocalFileToCheckpointFs(
}
}
+ @VisibleForTesting
+ void applyJitter(Consumer<Long> consumer) {
+ if (uploadJitter.isZero()) {
+ return;
+ }
+
+ long milliseconds = random.nextLong(0, uploadJitter.toMillis() + 1);
+ consumer.accept(milliseconds);
+ }
+
+ static class SleepConsumer implements Consumer<Long> {
+
+ @Override
+ public void accept(Long milliseconds) {
+ try {
+ Thread.sleep(milliseconds);
+ } catch (InterruptedException e) {
+ LOG.error(
Review Comment:
I'd suggest this to be `LOG.info`, we'd better not garble this message with
the root cause of task failure.
##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/state/rocksdb/RocksDBStateUploader.java:
##########
@@ -180,6 +195,31 @@ private HandleAndLocalPath uploadLocalFileToCheckpointFs(
}
}
+ @VisibleForTesting
Review Comment:
`VisibleForTesting` means this method is ONLY used for testing purpose,
apparently not the case here
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]