You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "JingsongLi (via GitHub)" <gi...@apache.org> on 2026/09/02 08:40:52 UTC

Re: [PR] [core] Fix snapshot lookup for duplicate commit timestamps [paimon]

JingsongLi commented on code in PR #9437:
URL: https://github.com/apache/paimon/pull/9437#discussion_r3912284758


##########
paimon-core/src/main/java/org/apache/paimon/utils/SnapshotManager.java:
##########
@@ -382,8 +382,8 @@ public long repairEarliestSnapshot(long snapshotId) {
                 earliest = mid + 1; // Search in the right half
                 finalSnapshot = snapshot;
             } else {
-                finalSnapshot = snapshot; // Found the exact match
-                break;
+                finalSnapshot = snapshot;
+                earliest = mid + 1;

Review Comment:
   [P2] Retry if rollback moves the upper bound after the first equal probe\n\nResolving  only closes the race before the binary search starts. With ,  first records snapshot 1. If  retains snapshot 1 at that point, it commits  and deletes snapshots 4 through 2. This branch advances  to 2, so the next  throws even though snapshot 1 is still the correct result. I reproduced this deterministically by triggering rollback immediately after the first equal probe.\n\nPlease read probes through  and, when a post-match probe disappears, refresh the live upper bound and restart with a bounded retry. A regression test should trigger rollback after the first equal midpoint has been read.



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

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