diff --git a/HISTORY.md b/HISTORY.md index 207d22f26..439223c2a 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -8,6 +8,7 @@ * Fix memory corruption error in scans if async_io is enabled. Memory corruption happened if there is IOError while reading the data leading to empty buffer and other buffer already in progress of async read goes again for reading. * Fix failed memtable flush retry bug that could cause wrongly ordered updates, which would surface to writers as `Status::Corruption` in case of `force_consistency_checks=true` (default). It affects use cases that enable both parallel flush (`max_background_flushes > 1` or `max_background_jobs >= 8`) and non-default memtable count (`max_write_buffer_number > 2`). * Fixed an issue where the `READ_NUM_MERGE_OPERANDS` ticker was not updated when the base key-value or tombstone was read from an SST file. +* Fixed a regression in scan for async_io. During seek, valid buffers were getting cleared causing a regression. ### New Features * Add basic support for user-defined timestamp to Merge (#10819). diff --git a/file/file_prefetch_buffer.cc b/file/file_prefetch_buffer.cc index 9222acdfa..9ea9129e2 100644 --- a/file/file_prefetch_buffer.cc +++ b/file/file_prefetch_buffer.cc @@ -664,7 +664,7 @@ bool FilePrefetchBuffer::TryReadFromCacheAsync( // submitted in PrefetchAsync should match with this request. Otherwise // buffers will be outdated. // Random offset called. So abort the IOs. - if (bufs_[curr_].offset_ != offset) { + if (prev_offset_ != offset) { AbortAllIOs(); bufs_[curr_].buffer_.Clear(); bufs_[curr_ ^ 1].buffer_.Clear();