nicktelford opened a new pull request, #22653: URL: https://github.com/apache/kafka/pull/22653
Interactive queries against a transactional RocksDB store (EOS) need to choose whether they observe writes staged in the current, uncommitted transaction. This adds a `readOnly(IsolationLevel)` override to `RocksDBStore` that returns a view bound to a specific `DBAccessor`: `READ_COMMITTED` reads through the underlying `DirectDBAccessor`, bypassing the transaction buffer, so the query sees only committed data; `READ_UNCOMMITTED` (and the default for non-transactional stores) uses the active accessor, preserving existing behaviour. The returned `ReadOnlyView` shares `cfAccessor` and `openIterators` with the store, so reads go through the same iterator-tracking path while the view exposes no writes. Includes `readOnly(IsolationLevel)` semantic tests covering `get`, `range`/`all`, and `prefixScan` that stage writes without committing and assert the `READ_COMMITTED`/`READ_UNCOMMITTED` divergence, reopening the store under an EOS context with `enable.transactional.statestores=true` to exercise the transaction buffer. 🤖 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]
