nicktelford opened a new pull request, #22682: URL: https://github.com/apache/kafka/pull/22682
Part of the KIP-892 interactive-query isolation-level series. Versioned stores are queryable through IQv2 (`VersionedKeyQuery`, `MultiVersionedKeyQuery`) and IQv1, but had no way to honour the configured isolation level. When the underlying `RocksDBStore` is transactional its accessor consults the staged-write buffer, so a `READ_COMMITTED` query would incorrectly observe writes still in the current transaction. This extends the `readOnly(IsolationLevel)` hook the other store families already have to versioned stores. Because versioned stores have no dedicated `ReadOnly*` parent interface, the default is added directly on `VersionedKeyValueStore`, and `VersionedBytesStore.readOnly` is covariantly narrowed so wrapper layers keep the versioned read methods. Reads in `RocksDBVersionedStore` — single-key latest, point-in-time, and timestamp-range — flow through `LogicalKeyValueSegment` views bound to a specific `DBAccessor`, so `READ_COMMITTED` bypasses the transaction buffer via the direct accessor. The metered and change-logging versioned wrappers gain matching overrides, and `StoreQueryUtils` dispatches versioned key queries through `readOnly(isolationLevel)`. Semantic tests assert that `READ_COMMITTED` hides staged writes while `READ_UNCOMMITTED` exposes them across the single-key, point-in-time, and timestamp-range read paths. This branched off the now-merged RocksDB isolation-level read work (KAFKA-20498) and 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]
