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

   The PR handles fetch for `compacted` topics. The fix was required only when 
complete batch disappears from the topic log, and same batch is marked 
re-available in Share Partition state cache. Subsequent log reads will not 
result the disappeared batch in read response hence respective batch will be 
left as avaialable in the state cache.
   
   The PR checks for the first fetched/read batch base offset and if it's 
greater than the position from where the read occurred (fetch offset) then if 
there exists any `available` batches in the state cache then they will be 
archived.
   
   Adds following test cases:
   1. `testAcquireAndAcknowledgeWithRecordsAheadOfRecordBatchStartOffset` - 
Added to verify the existing code for compacted topics.
   2. `testAcquireWhenBatchesAreRemovedFromBetweenInSubsequentFetchData` - 
Added to verify the existing code for compacted topics.
   3. testAcquireWhenBatchesRemovedForFetchOffset - Verifies the changes in the 
current PR.
   4. testAcquireWhenBatchesRemovedForFetchOffsetWithinBatch - Verifies the 
changes in the current PR.
   5. testAcquireWhenBatchesRemovedForFetchOffsetForSameCachedBatch - Verifies 
the changes in the current PR.
   


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to