提交 e053ccde 编写于 作者: A anand76 提交者: Facebook GitHub Bot

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
上级 0f91c72a
...@@ -511,7 +511,7 @@ class FilePickerMultiGet { ...@@ -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;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册