pnowojski commented on a change in pull request #18989:
URL: https://github.com/apache/flink/pull/18989#discussion_r820521747



##########
File path: 
flink-state-backends/flink-statebackend-changelog/src/main/java/org/apache/flink/state/changelog/PeriodicMaterializationManager.java
##########
@@ -104,7 +105,7 @@ public void start() {
 
             LOG.info("Task {} starts periodic materialization", subtaskName);
 
-            scheduleNextMaterialization();
+            scheduleNextMaterialization(new Random().nextInt((int) 
periodicMaterializeDelay));

Review comment:
       I think it would be better to have this logic deterministic based on for 
example some combination of uid, task id, subtask id, subtask name. It would 
make the behaviour less surprisingly to the users. As it is now, for example 
due to some unrelated failover, job might start miss behaving due to a random 
chance and debugging/reproducing issues might be impossible. 




-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to