提交 29111e92 编写于 作者: A anand76 提交者: Facebook Github Bot

Add bounds check in FilePickerMultiGet::PrepareNextLevel() (#5189)

Summary:
Add bounds check when looping through empty levels in FilePickerMultiGet
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5189

Differential Revision: D14925334

Pulled By: anand1976

fbshipit-source-id: 65d53247cf443153e28ce2b8b753fa51c6ae4566
上级 cca141ec
......@@ -672,8 +672,11 @@ class FilePickerMultiGet {
fp_ctx.search_right_bound = FileIndexer::kLevelMaxIndex;
}
// Skip all subsequent empty levels
while ((*level_files_brief_)[++curr_level_].num_files == 0) {
}
do {
++curr_level_;
} while ((curr_level_ < num_levels_) &&
(*level_files_brief_)[curr_level_].num_files == 0);
continue;
}
// Some files may overlap each other. We find
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册