nicktelford opened a new pull request, #22683: URL: https://github.com/apache/kafka/pull/22683
Part of the KIP-892 interactive-query isolation-level series. KIP-892 specifies that a transactional state store tracks its committed `Position` separately from the position deltas of the current (uncommitted) transaction, so `READ_COMMITTED` interactive queries do not observe positions for writes that are still only in the transaction buffer. The committed `Position` stays on `RocksDBStore`; the uncommitted deltas live in `RocksDBTransactionBuffer` alongside the staged writes they correspond to, under the same lock, so they are merged into the committed `Position` on commit and discarded on rollback (an aborted transaction no longer leaks position deltas). `RocksDBStore` routes position handling through the `DBAccessor` interface rather than `instanceof` checks: `DirectDBAccessor` writes straight to the committed `Position` and reports no uncommitted deltas, while `TransactionalDBAccessor` routes through the buffer. `READ_COMMITTED` sees only the committed `Position`, `READ_UNCOMMITTED` merges in the buffer's deltas, and `getPosition()` merges both for backwards compatibility. Restore writes bypass the buffer and update the committed `Position` directly. This builds on the `RocksDBTransactionBuffer` redesign (now on trunk) and is filed under the same KAFKA-20490; it now applies directly to trunk. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
