zhang-arvin opened a new pull request, #9363:
URL: https://github.com/apache/paimon/pull/9363
## What changes were proposed in this pull request?
Fix #9352: Data evolution self-merge validates staged row-ID partial updates
using base snapshot ID only, not snapshot UUID. A rollback can delete newer
snapshots, after which new commits reuse the same numeric snapshot IDs. This
allows staged updates from old snapshots to be applied to different replacement
snapshots (ABA problem).
### Changes
- **`DataEvolutionConflictDetection`**: Add `baseSnapshotUuid` field and
UUID-based lineage validation
- Fail closed when `latestSnapshot.id() < rowIdCheckFromSnapshot`
(rollback deleted base)
- Detect missing base snapshot (race with cleanup)
- ABA detection: compare `baseSnapshotUuid` with current snapshot UUID at
same ID
- **`ConflictDetection`**: Add `setRowIdCheckFromSnapshot(Long, String)`
UUID overload
- **`FileStoreCommit` / `FileStoreCommitImpl`**: Add UUID overload
- **`InnerTableCommit` / `TableCommitImpl`**: Add UUID overload
- **`ErrorMessages`**: Add `DATA_EVOLUTION_SNAPSHOT_LINEAGE_CONFLICT_MESSAGE`
### Backward Compatibility
The `baseSnapshotUuid` field is nullable. Callers that don't pass UUID
continue to work with existing behavior (no ABA protection).
### Follow-up
Caller layers (Spark `PaimonSparkWriter`, Flink
`DataEvolutionMergeIntoAction`, `BatchWriteBuilderImpl`) should be updated to
pass the snapshot UUID for full ABA protection.
### Related issues
- Fix #9352
--
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]