You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/04 00:09:09 UTC

[GitHub] [kafka] jolshan commented on pull request #9590: KAFKA-7556: KafkaConsumer.beginningOffsets does not return actual first offsets

jolshan commented on pull request #9590:
URL: https://github.com/apache/kafka/pull/9590#issuecomment-790175685


   @hachikuji thanks for the review. Just to clarify, you are suggesting updating/changing
   ```
   val oldSegments = logSegments(swapSegment.baseOffset, swapSegment.readNextOffset).filter { segment =>
           segment.readNextOffset > swapSegment.baseOffset
         }
   ``` 
   in `Log.completeSwapOperations`?
   When you say "removed" do you mean the segments should be deleted or not included in `oldSegments`? 
   When you say "smaller" do you mean a lower offset? 
   My understanding is that the swap segment's baseOffset can now have a higher offset than the baseOffsets of the oldSegments it is replacing. So I'm thinking we are trying to delete all segments before the swap segment's baseOffset as well? Is there a case where we can't assume all segments before the baseOffset can be deleted?
   
   And yes, will definitely add tests


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

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