feat(realtime): improve append table lifecycle and query support - #213
Conversation
zjw1111
left a comment
There was a problem hiding this comment.
Reviewed the realtime lifecycle / query changes. A few questions on the commit idempotency model and on StatisticsMode semantics, two perf points worth confirming, plus one test-coverage gap and three style nits. Inline.
| CreateManifestCommittable(identifier, commit_messages, watermark, /*properties=*/{}); | ||
| PAIMON_ASSIGN_OR_RAISE(std::vector<std::shared_ptr<ManifestCommittable>> pending_committables, | ||
| FilterCommitted({committable})); | ||
| const bool identifier_committed = pending_committables.empty(); |
There was a problem hiding this comment.
FilterCommitted only compares this identifier with the latest identifier for the commit user; it does not establish that this exact (commit_user, commit_identifier) produced a snapshot. If commit A succeeds but its response is lost, and a later commit B from the same user succeeds before A is retried, this branch can classify A as committed merely because B has a higher identifier. When A’s ranges are covered it then returns the latest snapshot (B) at line 959, despite the public API promising the snapshot produced by this commit. Please look up the snapshot for the exact identity and return its ID; if the ranges were committed by another identity, reject the retry.
There was a problem hiding this comment.
Thanks for pointing this out. CommitWithProgress intentionally follows the same identifier high-watermark semantics as FilterAndCommit; its return value is the latest snapshot covering the requested offset progress, so it can be passed to RefreshCommittedSnapshot. It is not intended to identify the exact snapshot produced by the retried commit.
I’ve clarified this contract in the API documentation and added a test covering A → B → retry A, where the retry returns B’s latest snapshot ID.
Purpose
Linked issue: #158
This PR completes several follow-up capabilities for append-table real-time reads and writes:
RealtimeStore;CommitWithProgressretries idempotent;Tests
API and Format
realtime.store.stats-modeoption withnoneandfullmodes.StatisticsModetoRealtimeStoreFactory::Create.Documentation
Generative AI tooling
Generated-by: OpenAI Codex (GPT-5)