Apache9 commented on PR #5300:
URL: https://github.com/apache/hbase/pull/5300#issuecomment-1601148135
Finally added a UT to reproduce the problem.
It could only happen for `ROWPREFIX_FIXED_LENGTH` bloomfilter, because only
for this type of bloom filter, we will not test whether it is a get scan(a
bug?)...
```
boolean passesBloomFilter(Scan scan, final SortedSet<byte[]> columns) {
byte[] row = scan.getStartRow();
switch (this.bloomFilterType) {
case ROW:
if (!scan.isGetScan()) {
return true;
}
return passesGeneralRowBloomFilter(row, 0, row.length);
case ROWCOL:
if (!scan.isGetScan()) {
return true;
}
if (columns != null && columns.size() == 1) {
byte[] column = columns.first();
// create the required fake key
Cell kvKey = PrivateCellUtil.createFirstOnRow(row,
HConstants.EMPTY_BYTE_ARRAY, column);
return passesGeneralRowColBloomFilter(kvKey);
}
// For multi-column queries the Bloom filter is checked from the
// seekExact operation.
return true;
case ROWPREFIX_FIXED_LENGTH:
return passesGeneralRowPrefixBloomFilter(scan);
default:
if (scan.isGetScan()) {
bloomFilterMetrics.incrementEligible();
}
return true;
}
}
```
--
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]