diff --git a/paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java b/paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java index a8673131a157..f894494d0c06 100644 --- a/paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java +++ b/paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java @@ -750,7 +750,7 @@ private int tryCommit( } retryResult = (RetryResult) result; - retryCount++; + if ((commitMaxTimeout != null && System.currentTimeMillis() - startMillis @@ -762,6 +762,8 @@ private int tryCommit( "Commit failed after %s millis with %s retries, there maybe exist commit conflicts between multiple jobs.", commitMaxTimeout.toMillis(), retryCount)); } + + retryCount++; } return retryCount + 1; } @@ -1067,7 +1069,7 @@ public void compactManifest() { break; } - retryCount++; + if ((commitMaxTimeout != null && System.currentTimeMillis() - startMillis @@ -1079,6 +1081,8 @@ public void compactManifest() { "Commit failed after %s millis with %s retries, there maybe exist commit conflicts between multiple jobs.", commitMaxTimeout.toMillis(), retryCount)); } + + retryCount++; } }