JingsongLi opened a new pull request, #1108:
URL: https://github.com/apache/paimon-rust/pull/1108

   ## Why
   
   PyPaimon already supports commit callbacks, but registering one currently 
forces its REST commit path back to Python because Rust core cannot deliver a 
post-publication notification.
   
   ## Changes
   
   - Add `CommitCallback` and `CommitCallbackContext` to Rust core. Context 
contains the confirmed snapshot, its data-file delta and the commit identifier, 
including assigned row IDs and sequence numbers.
   - Notify in registration order only after confirmed publication. Recover 
notifications from persisted delta manifests after a lost publication response, 
retaining file statistics.
   - Propagate callback errors while preserving published data and metadata. 
Callback failures stop later callbacks and do not republish the snapshot.
   - Add an internal Python transport using the existing Java v14 
commit-message bridge, preserving original Python exceptions and allowing 
Native reads inside callbacks.
   - Make callback references visible to Python GC and release them on close. 
Cover callback-owner cycles with both explicit close and abandoned committers.
   
   The notification timing and data-file delta follow Java 
`FileStoreCommitImpl` / `CommitCallback.Context`. The exposed context covers 
existing PyPaimon capabilities. Java's separate checkpoint `retry(committable)` 
hook is outside this change; filtering already committed identifiers does not 
emit a notification. Format Tables have no Paimon snapshots and reject 
registration.
   
   ## Verification
   
   - `cargo test -p paimon --lib table::table_commit::tests --locked`: 125 
passed.
   - Python binding `test_table_commit.py`: 69 passed.
   - PyPaimon Native write / commit / callback integration: 187 passed against 
this branch's locally built extension.
   - Rust 1.98.0 formatting and workspace Clippy with `fulltext,vortex` and `-D 
warnings`: passed.
   - Independent reviews of core publication/recovery and Python 
bridge/resource ownership completed; the GC finding was fixed and revalidated.
   
   The dependent PyPaimon PR will retain the existing public callback API and 
continue building Rust `main` in CI.
   


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