rocksdb/trace_replay
Hui Xiao 99b371b417 Skip subsequent trace writes after encountering trace write failure (#11996)
Summary:
**Context/Summary:**
We ignore trace writing status e.g, 543191f2ea/db/db_impl/db_impl_write.cc (L221-L222)

If a write into the trace file fails, subsequent trace write will continue onto the same file.

This will trigger the assertion `assert(sync_without_flush_called_)` intended to catch write to a file that has previously seen error, added in https://github.com/facebook/rocksdb/pull/10489, https://github.com/facebook/rocksdb/pull/10555

Alternative (rejected) is to handle trace writing status at a higher level at e.g, 543191f2ea/db/db_impl/db_impl_write.cc (L221-L222). However, it makes sense to ignore such status considering tracing is not a critical but assistant component to db operation. And this alternative requires more code change. So it's better to handle the failure at a lower level as this PR

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

Test Plan: Add new UT failed before this PR and pass after

Reviewed By: akankshamahajan15

Differential Revision: D50532467

Pulled By: hx235

fbshipit-source-id: f2032abafd94917adbf89a20841d15b448782a33
2023-10-24 09:58:02 -07:00
..
block_cache_tracer.cc Fix crash in block_cache_trace_analyzer if reference key is null in case of MultiGet (#11042) 2023-01-18 13:24:37 -08:00
block_cache_tracer.h fix compile warnings (#10976) 2022-11-22 15:51:01 -08:00
block_cache_tracer_test.cc Refactor block cache tracing APIs (#10811) 2022-10-21 12:15:35 -07:00
io_tracer.cc Add request_id in IODebugContext. (#8045) 2021-04-01 13:14:51 -07:00
io_tracer.h Make TraceRecord and Replayer public (#8611) 2021-08-11 19:32:46 -07:00
io_tracer_test.cc Print stack traces on frozen tests in CI (#10828) 2022-10-18 00:35:35 -07:00
trace_record.cc Add `IteratorTraceExecutionResult` for iterator related trace records. (#8687) 2021-08-20 15:35:56 -07:00
trace_record_handler.cc Replace `std::shared_ptr<SystemClock>` by `SystemClock*` in `TraceExecutionHandler` (#8729) 2021-08-31 11:24:27 -07:00
trace_record_handler.h Replace `std::shared_ptr<SystemClock>` by `SystemClock*` in `TraceExecutionHandler` (#8729) 2021-08-31 11:24:27 -07:00
trace_record_result.cc Add `IteratorTraceExecutionResult` for iterator related trace records. (#8687) 2021-08-20 15:35:56 -07:00
trace_replay.cc Skip subsequent trace writes after encountering trace write failure (#11996) 2023-10-24 09:58:02 -07:00
trace_replay.h Skip subsequent trace writes after encountering trace write failure (#11996) 2023-10-24 09:58:02 -07:00