Gimini-3 opened a new pull request, #23148:
URL: https://github.com/apache/kafka/pull/23148

   `RemoteLogLeaderEpochState` could drop an existing segment from both the 
referenced offset map and the unreferenced set when a later overlapping segment 
reused its start offset while a higher tail segment remained.
   
   The global `highestLogOffset` check prevents the overlap-removal loop from 
running in this case, and the previous value returned by `offsetToId.put` was 
ignored. This left the replaced segment in the partition metadata map but 
absent from leader-epoch listings used by remote retention cleanup.
   
   This change records a distinct replaced segment as unreferenced and adds a 
regression test covering:
   
   - `S0 = [0, 100]`
   - `S1 = [101, 200]`
   - `S2 = [0, 150]`
   - replay of the `S2` completion update
   
   Jira: https://issues.apache.org/jira/browse/KAFKA-20932
   
   Testing:
   
   - `./gradlew :storage:test --tests 
org.apache.kafka.server.log.remote.metadata.storage.RemoteLogLeaderEpochStateTest`
   - `./gradlew :storage:spotlessCheck`
   
   The contribution is my original work and I license it to the project under 
the project's open source license.


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