You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/01/20 13:00:26 UTC

[GitHub] [hudi] wxplovecc opened a new pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

wxplovecc opened a new pull request #4654:
URL: https://github.com/apache/hudi/pull/4654


   … to avoid duplicate records when flink job restart
   
   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
   
   ## What is the purpose of the pull request
   
   *(For example: This pull request adds quick-start document.)*
   
   ## Brief change log
   
   *(for example:)*
     - *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end.*
     - *Added HoodieClientWriteTest to verify the change.*
     - *Manually verified the change by running a job locally.*
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.
   


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017494974


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381) 
   * 629626dee6bfdf7b646df5254c82d973ea992867 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] wxplovecc commented on a change in pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
wxplovecc commented on a change in pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#discussion_r789373079



##########
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:
       Ok,once flink job with index.bootstrap=true failed like taskmanager lost
   if the job restart with the same GlobalAggregate name, it will reuse the `accumulators` in JobMaster
   and then, some parallelism of BootstrapOperator that faster then others will send records downstream
   without wait for all bootstrap task done




-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017494974


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381) 
   * 629626dee6bfdf7b646df5254c82d973ea992867 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] danny0405 commented on a change in pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
danny0405 commented on a change in pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#discussion_r789387075



##########
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:
       Only when the accumulator received all the task bootstrap info, the `readyTaskNum` matches and returns true, does that work for your case ? Because the fail over retry does not increase the `readyTaskNum` right ?




-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017636434


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5383",
       "triggerID" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 629626dee6bfdf7b646df5254c82d973ea992867 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5383) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017492582


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381) 
   * 629626dee6bfdf7b646df5254c82d973ea992867 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017492582


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381) 
   * 629626dee6bfdf7b646df5254c82d973ea992867 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] wxplovecc closed pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
wxplovecc closed pull request #4654:
URL: https://github.com/apache/hudi/pull/4654


   


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017537753


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5383",
       "triggerID" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381) 
   * 629626dee6bfdf7b646df5254c82d973ea992867 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5383) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] danny0405 commented on a change in pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
danny0405 commented on a change in pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#discussion_r789339843



##########
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:
       Hello, can you explain why we need this change ?




-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017487641


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] wxplovecc commented on a change in pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017485057


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017537753


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5383",
       "triggerID" : "629626dee6bfdf7b646df5254c82d973ea992867",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381) 
   * 629626dee6bfdf7b646df5254c82d973ea992867 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5383) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot commented on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017487641


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5381) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] hudi-bot removed a comment on pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
hudi-bot removed a comment on pull request #4654:
URL: https://github.com/apache/hudi/pull/4654#issuecomment-1017485057


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7c850bca882cb78a9bb7b59831db7599d143155d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7c850bca882cb78a9bb7b59831db7599d143155d UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@hudi.apache.org

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



[GitHub] [hudi] wxplovecc commented on a change in pull request #4654: [HUDI-3286] duplicate records when flink task restart with index.bootstrap=true

Posted by GitBox <gi...@apache.org>.
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




-- 
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-unsubscribe@hudi.apache.org

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