jackylee-ch opened a new pull request, #925: URL: https://github.com/apache/paimon-rust/pull/925
`TableWrite::prepare_commit` is documented to leave the writer reusable, but it left `partition_seq_cache` populated. That cache memoizes each bucket's `max_sequence_number + 1`. On the next reuse cycle `create_kv_writer` finds the cached partition, skips the rescan, and re-seeds the new `KeyValueFileWriter` from the pre-commit value. The second cycle's rows then get sequence numbers overlapping the first cycle's committed files, so the highest-sequence-wins merge keeps the older row — **a reused writer's updates are silently dropped on read**. Fix: invalidate the cache in `prepare_commit` so the next cycle rescans for `max + 1`, matching Java `MergeTreeWriter`. `sequence_snapshot` is pinned only by the postpone path (which forbids reuse), so it stays untouched. Added an integration test that reuses one writer across two commits and updates a key: it reads the stale row before the fix, the update after. -- 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]
