krishvishal opened a new issue, #4409:
URL: https://github.com/apache/iggy/issues/4409

   ### Description
   
   `handle_get_consumer_offset` answers from the local replica of the partition 
(see the TODO above it in `core/server/src/dispatch/partition.rs`). The SDK 
sends the read to the node it is connected to, and that node can be a backup 
that lags the partition's primary. A read right after a store can then return 
the previous offset. #4392 documents this on 
`ConsumerOffsetClient::get_consumer_offset`. The Kafka gateway needs 
read-your-commits: an `OffsetFetch` right after an `OffsetCommit` must return 
the committed offset. Raised in the review of #4392.
   
   ### Affected area / component
   
   Iggy server, Rust SDK
   
   ### Proposed solution
   
   Route the read to the partition primary, the way 
`GET_CONSUMER_OFFSET_ROUTING_CODE` routes offset writes. Gate it on the server 
with `is_caught_up_primary`, as the auto-commit path does.
   
   ### Alternatives considered
   
   Define a follower-read contract, and let a caller that needs 
read-your-commits route the read itself.
   


-- 
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