Revert "Re-use RocksDB iterators for scans"

This reverts commit 90060ac29f.
This commit is contained in:
Daniel Smith 2020-06-18 21:31:16 +00:00
parent dff1209672
commit 00102dc6f8
1 changed files with 1 additions and 5 deletions

View File

@ -201,11 +201,7 @@ struct RocksDBKeyValueStore : IKeyValueStore {
virtual double getTimeEstimate() { return SERVER_KNOBS->READ_RANGE_TIME_ESTIMATE; } virtual double getTimeEstimate() { return SERVER_KNOBS->READ_RANGE_TIME_ESTIMATE; }
}; };
void action(ReadRangeAction& a) { void action(ReadRangeAction& a) {
if (cursor == nullptr) { auto cursor = std::unique_ptr<rocksdb::Iterator>(db->NewIterator(readOptions));
cursor = std::unique_ptr<rocksdb::Iterator>(db->NewIterator(readOptions));
} else {
cursor->Refresh();
}
Standalone<RangeResultRef> result; Standalone<RangeResultRef> result;
int accumulatedBytes = 0; int accumulatedBytes = 0;
if (a.rowLimit >= 0) { if (a.rowLimit >= 0) {