Skip to content
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

Merged
merged 2 commits into from Aug 24, 2017
Merged

osd/PG: two cleanups #17171

merged 2 commits into from Aug 24, 2017

Conversation

xiexingguo
Copy link
Member

"all_info" includes peers from up and acting sets too, thus
deduplication is still needed here when calculating want_acting set.

@xiexingguo
Copy link
Member Author

@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()) {
Copy link
Contributor

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.

Copy link
Member Author

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 ||
Copy link
Contributor

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 "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@xiexingguo xiexingguo changed the title osd/PG: calc_ec_acting - dedup want_acting set osd/PG: two cleanups Aug 23, 2017
which has no consumers.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@yuriw yuriw merged commit 4d05884 into ceph:master Aug 24, 2017
@xiexingguo xiexingguo deleted the wip-dedup-ec-want-acting branch August 25, 2017 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants