JingsongLi commented on PR #967: URL: https://github.com/apache/paimon-rust/pull/967#issuecomment-5935349402
Requirement fit: SUPPORTED. Python binding: CLEAN; shared expiration implementation: FINDINGS. [P1] Preserve branch references before expiration (`crates/paimon/src/table/expire_snapshots.rs:222-260`, inherited from #965). With this exact Python extension, the existing branch_tables fixture reads branch row 1 successfully; main.expire_snapshots(retain_min=1, older_than_ms=2**62) expires snapshot 1, main still reads [1, 2], but the existing branch now raises ValueError/NotFound for its deleted manifest list. The branch snapshot/tag metadata is still live. Protect all live branch owners before deleting shared files, or reject unsupported expiration before mutation. The same underlying defect is described in https://github.com/apache/paimon-rust/pull/968#issuecomment-5935241081. [P2] Preserve persisted long-lived changelog owners (`crates/paimon/src/table/expire_snapshots.rs:234-238` and `snapshot_deletion.rs:324-326`). Java writes changelog/changelog-<id> immediately before removing snapshot-<id>; interrupted expiration can legitimately leave both owners. Java's Changelog(Snapshot) copies changelogManifestList, and its incremental reader reads that manifest list. I reproduced this state using an actual input-changelog commit, persisted its snapshot JSON as changelog/changelog-1, committed snapshot 2, and called the new Python expiration method. The owner remains, but its previously existing changelog manifest list is deleted. Reject such unsupported lifecycle states before mutation or preserve their referenced files. Independent changelog retention policy can stay outside this PR's scope; leaving a persisted owner dangling is the safety issue. Validation at 40eb555219147ca59e73dddd14223b651d8ca627: built and installed the actual extension with maturin; all 24 existing Python table tests passed, including the new API's write/expire/read, tag, limit and invalid-retention coverage. Two additional real-filesystem Python probes above fail. The binding's GIL release, argument ownership and exception mapping were independently checked. Current main also conflicts in table/mod.rs; rebase and rerun integration before merge. -- 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]
