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

   Prior to this PR, AbstractSegments automatically called the helper method to 
clean up expired segments as part of `getOrCreateSegmentIfLive()`. This works 
fine for windowed store implementations which call `getOrCreateSegmentIfLive()` 
exactly once per `put()` call, but is inefficient and difficult to reason about 
for the new RocksDBVersionedStore implementation (cf. 
https://github.com/apache/kafka/pull/13188) which makes potentially multiple 
calls to `getOrCreateSegmentIfLive()` for different segments for a single 
`put()` call. This PR addresses this by refactoring the call to clean up 
expired segments out of `getOrCreateSegmentIfLive()`, opting to have the 
different segments implementations specify when cleanup should occur instead. 
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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