Summary:
`DBIter::saved_value_` stores the result of any `Merge` that was performed to compute the iterator's current value. This value can be ditched whenever the iterator's position is changed, and is already cleared in `Seek`, `SeekForPrev`, `SeekToFirst`, and `SeekToLast`. With the patch, it is also cleared in `Next` and `Prev`.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/10934
Test Plan: `make check`
Reviewed By: akankshamahajan15
Differential Revision:
D41133473
Pulled By: ltamasi
fbshipit-source-id:
cf9e936f48151e64e455cc1664d6e9f4a03aa308
local_stats_.next_count_++;
if (ok && iter_.Valid()) {
+ ClearSavedValue();
+
if (prefix_same_as_start_) {
assert(prefix_extractor_ != nullptr);
const Slice prefix = prefix_.GetUserKey();
}
}
if (ok) {
+ ClearSavedValue();
+
Slice prefix;
if (prefix_same_as_start_) {
assert(prefix_extractor_ != nullptr);