rocksdb/file
akankshamahajan ff9ad2c39b Fix async_io failures in case there is error in reading data (#10890)
Summary:
Fix memory corruption error in scans if async_io is enabled. Memory corruption happened if data is overlapping between two buffers. If there is IOError while reading the data, it leads to empty buffer and other buffer already in progress of async read goes again for reading causing the error.
Fix: Added check to abort IO in second buffer if curr_ got empty.

This PR also fixes db_stress failures which happened when buffers are not aligned.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10890

Test Plan:
- Ran make crash_test -j32 with async_io enabled.
-  Ran benchmarks to make sure there is no regression.

Reviewed By: anand1976

Differential Revision: D40881731

Pulled By: akankshamahajan15

fbshipit-source-id: 39fcf2134c7b1bbb08415ede3e1ef261ac2dbc58
2022-11-01 16:06:51 -07:00
..
delete_scheduler.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
delete_scheduler.h Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
delete_scheduler_test.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
file_prefetch_buffer.cc Fix async_io failures in case there is error in reading data (#10890) 2022-11-01 16:06:51 -07:00
file_prefetch_buffer.h Fix async_io failures in case there is error in reading data (#10890) 2022-11-01 16:06:51 -07:00
file_util.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
file_util.h Set Read rate limiter priority dynamically and pass it to FS (#9996) 2022-05-18 19:41:44 -07:00
filename.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
filename.h Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
line_file_reader.cc Support read rate-limiting in SequentialFileReader (#9973) 2022-05-24 10:28:57 -07:00
line_file_reader.h Support read rate-limiting in SequentialFileReader (#9973) 2022-05-24 10:28:57 -07:00
prefetch_test.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
random_access_file_reader.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
random_access_file_reader.h Provide support for direct_reads with async_io (#10197) 2022-07-06 11:42:59 -07:00
random_access_file_reader_test.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
read_write_util.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
read_write_util.h Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
readahead_file_info.h Reuse internal auto readhead_size at each Level (expect L0) for Iterations (#9056) 2021-11-10 16:20:04 -08:00
readahead_raf.cc Make StringEnv, StringSink, StringSource use FS classes (#7786) 2021-01-04 16:01:01 -08:00
readahead_raf.h Make StringEnv, StringSink, StringSource use FS classes (#7786) 2021-01-04 16:01:01 -08:00
sequence_file_reader.cc Support read rate-limiting in SequentialFileReader (#9973) 2022-05-24 10:28:57 -07:00
sequence_file_reader.h Support read rate-limiting in SequentialFileReader (#9973) 2022-05-24 10:28:57 -07:00
sst_file_manager_impl.cc Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
sst_file_manager_impl.h Run Clang format on file folder (#10860) 2022-10-24 18:34:52 -07:00
writable_file_writer.cc WritableFileWriter to allow operation after failure when SyncWithoutFlush() is involved (#10555) 2022-08-24 07:30:52 -07:00
writable_file_writer.h Add manual_wal_flush, FlushWAL() to stress/crash test (#10698) 2022-09-30 15:48:33 -07:00