Description
When digging the HBASE-22862, we found a bug in RawBytesComparator#compareOnlyKeyPortion (although it's unrelated to the corruption in HBASE-22862).
@Override @VisibleForTesting public int compareOnlyKeyPortion(Cell left, Cell right) { // ... return (0xff & left.getTypeByte()) - (0xff & right.getTypeByte()); }
Here should be (0xff & right.getTypeByte()) - (0xff & left.getTypeByte()) I think.
I can see the BloomFilter or HFile v2 are still using the comparator in branch-1 (but not in branch-2). Maybe we can just remove the class (if some HFile encoded with this comparator, then mapping to the correct KVComparator just like 2.x), or fix the bug in current RawBytesComparator.
Attachments
Issue Links
- links to