summaryrefslogtreecommitdiff
path: root/db/memtable_list.h
diff options
context:
space:
mode:
authorZhichao Cao <zhichao@fb.com>2020-03-27 16:03:05 -0700
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>2020-03-27 16:04:43 -0700
commit4246888101f2b18becb67ce6e1ce5007fd0b3d3c (patch)
tree840b63cf42bbc57df2f7f54284b158923f9a0ead /db/memtable_list.h
parent2e276973e4cb9f943c2ac7f7b15730c8bfc33cb1 (diff)
Pass IOStatus to write path and set retryable IO Error as hard error in BG jobs (#6487)
Summary: In the current code base, we use Status to get and store the returned status from the call. Specifically, for IO related functions, the current Status cannot reflect the IO Error details such as error scope, error retryable attribute, and others. With the implementation of https://github.com/facebook/rocksdb/issues/5761, we have the new Wrapper for IO, which returns IOStatus instead of Status. However, the IOStatus is purged at the lower level of write path and transferred to Status. The first job of this PR is to pass the IOStatus to the write path (flush, WAL write, and Compaction). The second job is to identify the Retryable IO Error as HardError, and set the bg_error_ as HardError. In this case, the DB Instance becomes read only. User is informed of the Status and need to take actions to deal with it (e.g., call db->Resume()). Pull Request resolved: https://github.com/facebook/rocksdb/pull/6487 Test Plan: Added the testing case to error_handler_fs_test. Pass make asan_check Reviewed By: anand1976 Differential Revision: D20685017 Pulled By: zhichao-cao fbshipit-source-id: ff85f042896243abcd6ef37877834e26f36b6eb0
Diffstat (limited to 'db/memtable_list.h')
-rw-r--r--db/memtable_list.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/memtable_list.h b/db/memtable_list.h
index 5c00bbf43..bf6750bf2 100644
--- a/db/memtable_list.h
+++ b/db/memtable_list.h
@@ -266,7 +266,8 @@ class MemTableList {
VersionSet* vset, InstrumentedMutex* mu, uint64_t file_number,
autovector<MemTable*>* to_delete, FSDirectory* db_directory,
LogBuffer* log_buffer,
- std::list<std::unique_ptr<FlushJobInfo>>* committed_flush_jobs_info);
+ std::list<std::unique_ptr<FlushJobInfo>>* committed_flush_jobs_info,
+ IOStatus* io_s);
// New memtables are inserted at the front of the list.
// Takes ownership of the referenced held on *m by the caller of Add().