wxplovecc commented on a change in pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#discussion_r789394982



##########
File path: 
hudi-flink/src/main/java/org/apache/hudi/sink/bootstrap/BootstrapOperator.java
##########
@@ -151,11 +151,12 @@ protected void preLoadIndexRecords() throws Exception {
    */
   private void waitForBootstrapReady(int taskID) {
     int taskNum = getRuntimeContext().getNumberOfParallelSubtasks();
+    int attemptNum = getRuntimeContext().getAttemptNumber();
     int readyTaskNum = 1;
     while (taskNum != readyTaskNum) {
       try {
-        readyTaskNum = 
aggregateManager.updateGlobalAggregate(BootstrapAggFunction.NAME, taskID, new 
BootstrapAggFunction());
-        LOG.info("Waiting for other bootstrap tasks to complete, taskId = 
{}.", taskID);
+        readyTaskNum = 
aggregateManager.updateGlobalAggregate(BootstrapAggFunction.NAME + "_" + 
attemptNum, taskID, new BootstrapAggFunction());
+        LOG.info("Waiting for other bootstrap tasks to complete, taskId = {}, 
attemptNum = {}.", taskID, attemptNum);

Review comment:
       yes, you are right,  after fail over `updateGlobalAggregate` function 
return previous accumulator info




-- 
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: commits-unsubscr...@hudi.apache.org

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


Reply via email to