rocksdb/db/db_impl
Zhichao Cao a10f12eda1 Auto resume the DB from Retryable IO Error (#6765)
Summary:
In current codebase, in write path, if Retryable IO Error happens, SetBGError is called. The retryable IO Error is converted to hard error and DB is in read only mode. User or application needs to resume it. In this PR, if Retryable IO Error happens in one DB, SetBGError will create a new thread to call Resume (auto resume). otpions.max_bgerror_resume_count controls if auto resume is enabled or not (if max_bgerror_resume_count<=0, auto resume will not be enabled). options.bgerror_resume_retry_interval controls the time interval to call Resume again if the previous resume fails due to the Retryable IO Error. If non-retryable error happens during resume, auto resume will terminate.

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

Test Plan: Added the unit test cases in error_handler_fs_test and pass make asan_check

Reviewed By: anand1976

Differential Revision: D21916789

Pulled By: zhichao-cao

fbshipit-source-id: acb8b5e5dc3167adfa9425a5b7fc104f6b95cb0b
2020-07-15 11:03:58 -07:00
..
db_impl_compaction_flush.cc Auto resume the DB from Retryable IO Error (#6765) 2020-07-15 11:03:58 -07:00
db_impl_debug.cc Replace reinterpret_cast with static_cast_with_check (#7067) 2020-07-02 19:25:41 -07:00
db_impl_experimental.cc Replace reinterpret_cast with static_cast_with_check (#7067) 2020-07-02 19:25:41 -07:00
db_impl_files.cc First step towards handling MANIFEST write error (#6949) 2020-06-24 19:07:08 -07:00
db_impl_open.cc Auto resume the DB from Retryable IO Error (#6765) 2020-07-15 11:03:58 -07:00
db_impl_readonly.cc Replace reinterpret_cast with static_cast_with_check (#7067) 2020-07-02 19:25:41 -07:00
db_impl_readonly.h API change: DB::OpenForReadOnly will not write to the file system unless create_if_missing is true (#6900) 2020-06-03 18:57:49 -07:00
db_impl_secondary.cc Replace reinterpret_cast with static_cast_with_check (#7067) 2020-07-02 19:25:41 -07:00
db_impl_secondary.h Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) 2020-02-20 12:09:57 -08:00
db_impl_write.cc Auto resume the DB from Retryable IO Error (#6765) 2020-07-15 11:03:58 -07:00
db_impl.cc Replace reinterpret_cast with static_cast_with_check (#7067) 2020-07-02 19:25:41 -07:00
db_impl.h Auto resume the DB from Retryable IO Error (#6765) 2020-07-15 11:03:58 -07:00
db_secondary_test.cc More Makefile Cleanup (#7097) 2020-07-09 14:35:17 -07:00