Hi folks,

I am reading RocksDBStore.cc and trying to understand how the iterator works. I found myself positively puzzled by the implementation of lower_bound() and upper_bound() of CFIteratorImpl. It seems to be that upper_bound() doesn’t really set the upper bound for iteration. Instead, it just resets the lower bound, presumably to a more advanced position after the initial lower_bound() call, since it calls lower_bound(). It doesn’t reset the true upper bound, which is set in iterate_upper_bound and used by RocksDB.

Is my understanding correct or am I missing something?

Thanks,
Yixin