hachikuji commented on pull request #10344:
URL: https://github.com/apache/kafka/pull/10344#issuecomment-801520703


   One other thing maybe we can fix here. In 
`ReplicatedLog.validateOffsetAndEpoch`, we have the following check:
   ```
           } else if (
                   earliestSnapshotId().isPresent() &&
                   ((offset < startOffset()) ||
                    (offset == startOffset() && epoch != 
earliestSnapshotId().get().epoch) ||
                    (epoch < earliestSnapshotId().get().epoch))
           ) {
   ```
   We probably should be caching the result of `earliestSnapshotId`. This is 
probably one reason it was killing performance. 


----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to