diff --git a/HISTORY.md b/HISTORY.md index 47d16dc20..48026af2f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -5,6 +5,7 @@ * Fixed a bug where RocksDB could corrupt DBs with `avoid_flush_during_recovery == true` by removing valid WALs, leading to `Status::Corruption` with message like "SST file is ahead of WALs" when attempting to reopen. * Fixed a bug in async_io path where incorrect length of data is read by FilePrefetchBuffer if data is consumed from two populated buffers and request for more data is sent. * Fixed a CompactionFilter bug. Compaction filter used to use `Delete` to remove keys, even if the keys should be removed with `SingleDelete`. Mixing `Delete` and `SingleDelete` may cause undefined behavior. +* Fixed a bug which might cause process crash when I/O error happens when reading an index block in MultiGet(). ### New Features * DB::GetLiveFilesStorageInfo is ready for production use. diff --git a/table/block_based/block_based_table_reader.cc b/table/block_based/block_based_table_reader.cc index baef3bf89..19f65cffe 100644 --- a/table/block_based/block_based_table_reader.cc +++ b/table/block_based/block_based_table_reader.cc @@ -2928,6 +2928,9 @@ void BlockBasedTable::MultiGet(const ReadOptions& read_options, } if (first_block) { iiter->Seek(key); + if (!iiter->Valid()) { + break; + } } first_block = false; iiter->Next();