Rdb_iterator_base::next_with_direction: too many compares for eof check
rockeet opened this issue · comments
in Rdb_iterator_base::next_with_direction
, it checks prefix and lower bound and upper bound, this consuming too many cpu in our cases, when running tpcc, the flame graph showing these 3 compare takes up to 3%
cpu time, which is ~10% of myrocks::Rdb_iterator_base::next_with_direction
.
MyRocks use [Reverse]BytewiseComparator, so the optimal should be just 1 compare in scanning, I have tried to improve this way, it is ok in most cases but failed some mtr tests. I am expecting an official fix for this issue.
Thanks for reporting. if you are using new rocksdb version(>=8.8.0), then you can try to disable iterator bound check(rocksdb_check_iterate_bounds = 0);
Thanks for reporting. if you are using new rocksdb version(>=8.8.0), then you can try to disable iterator bound check(rocksdb_check_iterate_bounds = 0);
Very thanks!