Hello,
I was playing with Bloom filter and found a case where it is not used for PK lookups. If I create an identical secondary key, Bloom Filter is used.
Why is this not implemented? Did somebody forget this or there is some reason this case is not important? Should I file this as a bug?
== Details ==
I start the server with this setting:
rocksdb_override_cf_options='cf1={block_based_table_factory={filter_policy=bloomfilter:10:false;whole_key_filtering=0;};prefix_extractor=capped:4};'
Then I run this:
create table t21 (key_col int not null, col1 int, primary key(key_col) comment 'cf1') engine=rocksdb;
insert into t21 values (1,1),(2,2),(3,3);
then I set a breakpoint in myrocks::ha_rocksdb::can_use_bloom_filter and run
select * from t21 where key_col=1;
the breakpoint is not hit.
Let's try with a secondary key instead: disable the breakpoint and run:
create table t22 (key_col int not null, col1 int, key(key_col) comment 'cf1') engine=rocksdb;
insert into t22 values (1,1),(2,2),(3,3);
enable the breakpoint and run:
select * from t22 where key_col=1;
And see that the breakpoint is hit and can_use_bloom_filter() returns true (which is what I expected for both cases).
--
BR
Sergei Petrunia