Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
We use bloom filters on primary index (as LSMBTree) to skip unnecessary pk lookups on some disk components. The idea is that if the bloom filter reports false on some pk, we totally skip searching that disk component.
However, in our current complicated BTree/LSMBTree software stack, the bloom filter is completely useless (in terms of saving I/Os). Take a look at LSMBTreePointSearchCursor. At line 74, we first call btreeAccessors[i].search(rangeCursors[i], predicate), and then call BloomFilterAwareBTreePointSearchCursor.hasNext() which performs bloom filter check. However, the call sequence is wrong. Actually, btreeAccessors[i].search has already searched the primary key against the BTree, from the root down to the leaf, rendering bloom filter completely useless in this case.