]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Prevent iterating over range tombstones beyond `iterate_upper_bound` (#10966) (#10986)
authorChangyu Bi <102700264+cbi42@users.noreply.github.com>
Mon, 28 Nov 2022 02:23:50 +0000 (18:23 -0800)
committerGitHub <noreply@github.com>
Mon, 28 Nov 2022 02:23:50 +0000 (18:23 -0800)
commit33767c4840019d666206a083396f69a6a7acbced
tree0953307ec4d77a9e22f33b08bfdb77cacaa1717f
parentdfb1aee9217a47478949dcd9fb95362acd1d2fa1
Prevent iterating over range tombstones beyond `iterate_upper_bound` (#10966) (#10986)

Summary:
Currently, `iterate_upper_bound` is not checked for range tombstone keys in MergingIterator. This may impact performance when there is a large number of range tombstones right after `iterate_upper_bound`. This PR fixes this issue by checking `iterate_upper_bound` in MergingIterator for range tombstone keys.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10966

Test Plan:
- added unit test
- stress test: `python3 tools/db_crashtest.py whitebox --simple --verify_iterator_with_expected_state_one_in=5 --delrangepercent=5 --prefixpercent=18 --writepercent=48 --readpercen=15 --duration=36000 --range_deletion_width=100`
- ran different stress tests over sandcastle
- Falcon team ran some test traffic and saw reduced CPU usage on processing range tombstones.
HISTORY.md
db/db_impl/db_impl.cc
db/db_range_del_test.cc
include/rocksdb/options.h
table/merging_iterator.cc
table/merging_iterator.h