Fix an incorrect MultiGet assertion (#10695)

Summary:
The assertion in ```FilePickerMultiGet::ReplaceRange()``` was incorrect. The function should only be called to replace the range after finishing the search in the current level, which is indicated by ```hit_file_ == nullptr``` i.e no more overlapping files in this level.

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

Reviewed By: gitbw95

Differential Revision: D39583217

Pulled By: anand1976

fbshipit-source-id: d4cedfb2b62fb9f3a083e9848a403ae6342f0519
main
anand76 2 years ago committed by Facebook GitHub Bot
parent 0f91c72adc
commit e053ccde99
  1. 2
      db/version_set.cc

@ -511,7 +511,7 @@ class FilePickerMultiGet {
MultiGetRange& GetRange() { return range_; } MultiGetRange& GetRange() { return range_; }
void ReplaceRange(const MultiGetRange& other) { void ReplaceRange(const MultiGetRange& other) {
assert(curr_level_ == 0 || !RemainingOverlapInLevel()); assert(hit_file_ == nullptr);
range_ = other; range_ = other;
current_level_range_ = other; current_level_range_ = other;
} }

Loading…
Cancel
Save