JunRuiLee commented on code in PR #7832:
URL: https://github.com/apache/paimon/pull/7832#discussion_r3260300330


##########
paimon-core/src/main/java/org/apache/paimon/operation/FileStoreCommitImpl.java:
##########
@@ -969,6 +969,10 @@ CommitResult tryCommitOnce(
                 deltaFiles = assigned.assignedEntries;
             }
 
+            if (options.snapshotSequenceOrdering()) {
+                deltaFiles = stampSequenceWithSnapshotId(newSnapshotId, 
commitKind, deltaFiles);

Review Comment:
   Thanks for catching this!
   
     The root cause is: snapshot ordering relies on snapshot id to determine 
record order, but inline compaction happens **before** snapshot creation — 
files have not been stamped with the correct snapshot id yet, so compaction 
would propagate incorrect values to KV records.
   
     **Fix**: require `write-only=true` for snapshot-ordering tables, disabling 
inline compaction. Compaction must be done by dedicated compact jobs (which 
read from committed manifests where files are already correctly stamped).
   



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

Reply via email to