Closed cbi42 closed 1 week ago
@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@cbi42 has updated the pull request. You must reimport the pull request before landing.
@cbi42 has updated the pull request. You must reimport the pull request before landing.
@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@cbi42 merged this pull request in facebook/rocksdb@a31fe521732c6150003ea43f1e30f27f13be597c.
Summary: the return value for
ErrorHandler::SetBGError(error)
seems to be not well-defined, it can bebg_error_
(no matter if thebg_error_
is set to the input error), ok status orrecovery_error_
fromStartRecoverFromRetryableBGIOError()
. Therecovery_error_
returned may be an OK status.We have only a few places that use the return value of
SetBGError()
and they don't need to do so. Using the return value may even be wrong for example in https://github.com/facebook/rocksdb/blob/3ee4d5a11a882056b341a9a1694a71371a39f664/db/db_impl/db_impl_write.cc#L2365 where a non-oks
could be overwritten to OK. This PR changes SetBGError() to return void and clean up relevant code.Test plan: existing unit tests and go over all places where return value of
SetBGError()
is used.