New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osd/PrimaryLogPG: maybe_handle_manifest_detail - sanity check obc existence #17298
Conversation
src/osd/PrimaryLogPG.cc
Outdated
@@ -2371,6 +2371,11 @@ PrimaryLogPG::cache_result_t PrimaryLogPG::maybe_handle_manifest_detail( | |||
} | |||
} | |||
|
|||
if (!obc || !obc->obs.oi.has_manifest()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How good it would be place this check at start of PrimaryLogPG::maybe_handle_manifest_detail
src/osd/PrimaryLogPG.cc
Outdated
dout(10) << __func__ << " obc DNE or has no manifest" << dendl; | ||
return cache_result_t::NOOP; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The caller only calls into handle_manifest of obc && obc->obs.oi.has_manifest(). Can we instead make this an assert at the top of the function, and remove teh various conditional checks for !obc? It will be simpler (this code was originally copy pasted from the cache case, which has to handle a missing object.. the manifest case does not!).
Thanks!
a46e9c8
to
56105b8
Compare
…stence Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
retest this please |
Signed-off-by: xie xingguo xie.xingguo@zte.com.cn