nicktelford opened a new pull request, #22681:
URL: https://github.com/apache/kafka/pull/22681

   Part of the KIP-892 interactive-query isolation-level series. With 
transactional state stores enabled, the in-memory key-value, window, and 
session stores buffer uncommitted writes in a transaction buffer, and their 
reads consulted that buffer unconditionally. An interactive query therefore had 
no way to request only committed data — a `READ_COMMITTED` query would observe 
writes still staged in the open transaction.
   
   This overrides `readOnly(IsolationLevel)` on each of the three in-memory 
stores to return a view that consults the transaction buffer under 
`READ_UNCOMMITTED` and bypasses it under `READ_COMMITTED`, reading the base map 
directly. For the window and session stores the buffer dispatch in each read 
path is extracted into private helpers parameterised by the buffer (collapsing 
the forward/backward pairs into shared helpers), so the view can opt in or out 
without duplicating the iteration logic. The key-value view synchronises on the 
store's monitor so concurrent IQ reads observe a consistent snapshot relative 
to processor-thread writes.
   
   Semantic tests across the three store families assert that 
`READ_UNCOMMITTED` observes staged writes (and deletes) while `READ_COMMITTED` 
sees only the last committed snapshot.
   
   This branched off the now-merged in-memory transactional-store and 
IQ-isolation-framework work 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]

Reply via email to