lengkristy commented on issue #8636:
URL: https://github.com/apache/iceberg/issues/8636#issuecomment-1735062236

   > If you are writing data concurrently, then `CommitFailedException` is an 
expected (and retryable) exception. In your case, the `CommitFailedException` 
indicates that the table metadata was modified concurrently by another process, 
which means that the respective changes can't be applied without first 
refreshing the table you're doing the changes against. What you could do is add 
some retry handling:
   > 
   > ```
   > Tasks.foreach(ops)
   >           .retry(COMMIT_NUM_RETRIES_DEFAULT)
   >           .exponentialBackoff(
   >               COMMIT_MIN_RETRY_WAIT_MS_DEFAULT,
   >               COMMIT_MAX_RETRY_WAIT_MS_DEFAULT,
   >               COMMIT_TOTAL_RETRY_TIME_MS_DEFAULT,
   >               2.0 /* exponential */)
   >           .onlyRetryOn(CommitFailedException.class)
   >           .run(
   >               taskOps -> { 
   >                  // refresh table + perfom the commit
   >              });
   > ```
   
   @nastra Thanks, I will try it


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to