JingsongLi commented on PR #9363:
URL: https://github.com/apache/paimon/pull/9363#issuecomment-5467413389

   A simpler design would be to pass the captured base Snapshot as one value 
instead of propagating (snapshotId, snapshotUuid):
   
   `rowIdCheckConflict(@Nullable Snapshot baseSnapshot)`
   
   DataEvolutionConflictDetection can then:
   Reject latestSnapshot.id() < baseSnapshot.id().
   Read the current snapshot at that ID without using the snapshot cache.
   Reject it if missing or different from baseSnapshot.
   Use baseSnapshot.nextRowId() directly.
   This avoids mismatched ID/UUID pairs, handles legacy snapshots with a null 
UUID through full snapshot equality, and can be reused by both DML and 
materialize-DV compaction.
   The lineage validation should also run before returning for an empty 
RowIdConflictChecker, so index-only/DV-only commits are protected.
   We still need a polymorphic hook on ConflictDetection, because 
FileStoreCommitImpl holds it as the base type. Moving this state into 
FileStoreCommitImpl would reduce one overload but mix data-evolution-specific 
logic back into the generic commit implementation.


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