injected_error_count is needed to verify read error injection. For example, when injected_error_count == 0, the read call should not return error. https://github.com/facebook/rocksdb/commit/981fd432fa2441fc10a59a462bd14906ccb1c0e0 only calculated injected_error_count under SharedState::ignore_read_error=false so injected_error_count==0 when SharedState::ignore_read_error=true. However we can still inject read error in critical read path under SharedState::ignore_read_error=true so the read call is expected to return injected error. This contradicts to the injected_error_count == 0 as we skipped its calculation. As a consequence, we see
Context/Summary:
injected_error_count
is needed to verify read error injection. For example, when injected_error_count == 0, the read call should not return error. https://github.com/facebook/rocksdb/commit/981fd432fa2441fc10a59a462bd14906ccb1c0e0 only calculatedinjected_error_count
underSharedState::ignore_read_error=false
soinjected_error_count==0
whenSharedState::ignore_read_error=true
. However we can still inject read error in critical read path underSharedState::ignore_read_error=true
so the read call is expected to return injected error. This contradicts to theinjected_error_count == 0
as we skipped its calculation. As a consequence, we seein code paths
Test: CI