You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just wanted to inform users of the library that if they can't see any entry using a DBIterator this is probably because they forgot to iter.seek(SeekKey::Start) for example.
It takes me a long time to understand why, I read many things on RocksDB before I decided to look into some iterator tests of this rust wrapper.
@Kerollmops Mostly because the DBIterator won't position at any key before user calls one of Seek, SeekForPrev, SeekToFirst, or SeekToLast manually. Thank you for informing this, do you think we can close it now?
I think we can not close it until someone (including me) has made a PR that clarify this behavior and/or change it. Because currently the DBIterator does not follow the RAII rules in the sence that it is not "initialised" just after the creation.
It could be interresting to create something like a DBIteratorBuilder that does not implement the Iterator trait itself but allow the user to build one that follows its requirements.
I just wanted to inform users of the library that if they can't see any entry using a
DBIterator
this is probably because they forgot toiter.seek(SeekKey::Start)
for example.It takes me a long time to understand why, I read many things on RocksDB before I decided to look into some iterator tests of this rust wrapper.
https://github.com/pingcap/rust-rocksdb/blob/05aaf93fdceff092768b1e9d50bc13c519d70d76/src/rocksdb.rs#L2378-L2380
The text was updated successfully, but these errors were encountered: