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/PG: two cleanups #17171
osd/PG: two cleanups #17171
Conversation
@jdurgin Since you are there, mind taking a look? |
src/osd/PG.cc
Outdated
@@ -1168,7 +1168,8 @@ void PG::calc_ec_acting( | |||
if (acting.size() > (unsigned)i && acting[i] != CRUSH_ITEM_NONE && | |||
!all_info.find(pg_shard_t(acting[i], shard_id_t(i)))->second.is_incomplete() && | |||
all_info.find(pg_shard_t(acting[i], shard_id_t(i)))->second.last_update >= | |||
auth_log_shard->second.log_tail) { | |||
auth_log_shard->second.log_tail && | |||
std::find(want.begin(), want.end(), acting[i]) == want.end()) { |
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.
there is chance that two shards are co-located in the same OSD. so i don't think we should dedup here.
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.
Thanks for pointing out this for me, kefu. I confess that I don't understand the behaviour of EC-PGs well:-(
src/osd/PG.cc
Outdated
@@ -1177,6 +1178,10 @@ void PG::calc_ec_acting( | |||
j != all_info_by_shard[shard_id_t(i)].end(); | |||
++j) { | |||
assert(j->shard == i); | |||
if (j->osd == CRUSH_ITEM_NONE || |
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.
it's fine if j->osd == CRUSH_ITEM_NONE
.
@@ -1302,12 +1302,12 @@ void PG::calc_replicated_acting( | |||
const pg_info_t &cur_info = all_info.find(acting_cand)->second; | |||
if (cur_info.is_incomplete() || | |||
cur_info.last_update < primary->second.log_tail) { | |||
ss << " shard " << acting_cand << " (stray) REJECTED " | |||
ss << " shard " << acting_cand << " (acting) REJECTED " |
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.
lgtm.
966f462
to
bc3e6e2
Compare
which has no consumers. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
"all_info" includes peers from up and acting sets too, thus
deduplication is still needed here when calculating want_acting set.