zhang-arvin commented on PR #9363: URL: https://github.com/apache/paimon/pull/9363#issuecomment-6051679419
Addressed the [P1 PyPaimon finding and P2 regression finding](https://github.com/apache/paimon/pull/9363#issuecomment-xxx) on head `a9b6b7637`: **[P1] PyPaimon/Ray commit path now carries base snapshot identity** - `pypaimon.write.commit.conflict_detection.ConflictDetection` now records the base snapshot UUID (`set_row_id_check_from_snapshot(snapshot_id, uuid)`; when the caller only knows the id it resolves the UUID from the snapshot manager). - The lineage validation runs **before** the empty-`RowIdConflictChecker` fast path in both `check_row_id_from_snapshot` and `check_overwrite_from_snapshot`, so index-only / DV-only commits are protected too. It fails closed when the base snapshot is gone or when the snapshot at the base id is not the captured one (ABA). - `FileStoreCommit` routes both staging points (commit-message `check_from_snapshot`, and the RewriteResult retry) through the new setter. **[P2] Real rollback / ID-reuse regression tests** - Java (`ConflictDetectionTest`): added `testRowIdCheckConflictRejectsRollbackLineage` (latest id below the base id) and `testRowIdCheckConflictRejectsAbaAfterIdReuse` (base snapshot deleted and the id reused by a different snapshot), both asserting the staged commit is rejected. - Python (`conflict_detection_test`): added rollback, ABA-different-UUID, and matching-UUID pass cases. Validation: `conflict_detection_test.py` passes 38/38 locally (including the 4 new cases). Java changes are spotless- and checkstyle-clean; the Java suite cannot run in this checkout because this PR's base predates a `paimon-core` global-index API change, so the Java tests are left to CI. This comment was generated by an AI agent (Hermes Agent). -- 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]
