smengcl commented on code in PR #9576:
URL: https://github.com/apache/ozone/pull/9576#discussion_r2662106437
##########
hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/hadoop/hdds/utils/db/MinHeapMergeIterator.java:
##########
@@ -109,7 +109,7 @@ public V next() {
// Clear the keys list by setting all entries to null.
keys.clear();
// Advance all entries with the same key (from different files)
- while (!minHeap.isEmpty() &&
Objects.equals(minHeap.peek().getCurrentKey(), currentKey)) {
+ while (!minHeap.isEmpty() &&
comparator.compare(minHeap.peek().getCurrentKey(), currentKey) == 0) {
Review Comment:
cmiiw but if I understand correctly, when `compareTo()` and `equals()` are
implemented correctly in parity, this change should not make much difference?
except in the case where one argument could be null?
https://github.com/apache/ozone/blob/90994bb75f771f2023f9697430678ff05e3cc957/hadoop-hdds/rocksdb-checkpoint-differ/src/main/java/org/apache/hadoop/hdds/utils/db/MinHeapMergeIterator.java#L183-L200
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]