• Z
    Auto resume the DB from Retryable IO Error (#6765) · a10f12ed
    Zhichao Cao 提交于
    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
    a10f12ed
options_helper.cc 54.4 KB