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
This commit is contained in:
parent
cca141ecf8
commit
29111e92b4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user