Jason918 commented on a change in pull request #14679: URL: https://github.com/apache/pulsar/pull/14679#discussion_r826530600
########## File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/EntryImpl.java ########## @@ -149,7 +148,15 @@ public long getEntryId() { @Override public int compareTo(EntryImpl other) { - return ComparisonChain.start().compare(ledgerId, other.ledgerId).compare(entryId, other.entryId).result(); + if (this.ledgerId != other.ledgerId) { + return this.ledgerId < other.ledgerId ? -1 : 1; Review comment: Yep, one more equals check. But i believe it's most likely will be optimized by JIT :) -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org