8000 dont fill cache on truncate by jsteemann · Pull Request #9721 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

dont fill cache on truncate #9721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
dont fill cache on truncate
  • Loading branch information
jsteemann committed Aug 15, 2019
commit d5a81c5386abc965c8d701b2a7984f47ae2cf19d
3 changes: 3 additions & 0 deletions arangod/RocksDBEngine/RocksDBCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,12 @@ Result RocksDBCollection::truncate(transaction::Methods& trx, OperationOptions&
// normal transactional truncate
RocksDBKeyBounds documentBounds = RocksDBKeyBounds::CollectionDocuments(_objectId);
rocksdb::Comparator const* cmp = RocksDBColumnFamily::documents()->GetComparator();
// intentionally copy the read options so we can modify them
rocksdb::ReadOptions ro = mthds->iteratorReadOptions();
rocksdb::Slice const end = documentBounds.end();
ro.iterate_upper_bound = &end;
// we are going to blow away all data anyway. no need to blow up the cache
ro.fill_cache = false;

TRI_ASSERT(ro.snapshot);

Expand Down
0