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
os/bluestore: optimize _collection_list. #18777
Conversation
src/os/bluestore/BlueStore.cc
Outdated
@@ -7213,8 +7213,7 @@ int BlueStore::_collection_list( | |||
if (!pnext) | |||
pnext = &static_next; | |||
|
|||
if (start == ghobject_t::get_max() || | |||
start.hobj.is_max()) { | |||
if (start.is_max()) { |
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.
this is important because we want to skip out even if ghobject_t::max is false but hobj.max is true.
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.
.
883f143
to
ede0d94
Compare
update. BTW Whan't mean if ghobject_t::is_max is false but hobj.is_max is true? Thanks! |
See 3fa09f0. If I remember correctly it was either this, or adding a special case in the caller so that if we have hobject_t max and are composing the ghobject_t we conditoinally do {shard,hobj} or max depending on whether hobj.is_max(). This was simpler (since <shard,max> is still clearly the end of the collection). |
Thanks! |
Thanks very much sage! |
…stent_count. If next != ghobject_t::get_max(), this mean collection has more data than nonexistent_count. For this we should bypass check. And fix wrong comments because _collection_list don't return object num. Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
If next is null, we already set a non-null to it. So don't check again. Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
No description provided.