nicktelford opened a new pull request, #22626: URL: https://github.com/apache/kafka/pull/22626
Adds a transactional implementation of `InMemoryKeyValueStore`, building on the transaction-buffer framework (KAFKA-20490). `InMemoryTransactionBuffer` implements `TransactionBuffer` for in-memory stores backed by a `ConcurrentNavigableMap`: writes are staged in the inherited `pendingWrites` map and flushed to the backing map on commit, while base iterators are created directly from the backing map. Reads merge staged writes over the base iterator so a transaction observes its own uncommitted writes. `InMemoryKeyValueStore` routes reads and writes through the buffer only when transactional state stores are enabled, leaving the non-transactional path unchanged. Restore bypasses the buffer to write directly to the backing map, and the store reports its pending write-buffer size via `approximateNumUncommittedBytes()`, feeding the uncommitted-bytes limit added in KAFKA-20491. Unlike RocksDB stores, in-memory stores never use `deleteRange`, so the buffer carries no range-tombstone handling. This is part of [KIP-892](https://cwiki.apache.org/confluence/display/KAFKA/KIP-892%3A+Transactional+Semantics+for+State+Stores). -- 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]
