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



##########
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:
       Anyway, can not we use here:
   ```
   Objects.hash(
     env.getTaskInfo().getTaskName(), 
     env.getTaskInfo().getIndexOfThisSubtask(), 
     incrementalId++) % periodicMaterializeDelay
   ```?

##########
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:
       Anyway, can not we use here:
   ```
   Objects.hash(
     env.getTaskInfo().getTaskName(), 
     env.getTaskInfo().getIndexOfThisSubtask(), 
     incrementalId++) % periodicMaterializeDelay
   ```
   ?




-- 
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