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

Conversation

Projects
None yet
3 participants
@xiexingguo
Copy link
Member

commented Aug 23, 2017

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

@xiexingguo xiexingguo requested a review from jdurgin Aug 23, 2017

@xiexingguo

This comment has been minimized.

Copy link
Member Author

commented Aug 23, 2017

@jdurgin Since you are there, mind taking a look?

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

This comment has been minimized.

Copy link
@tchaikov

tchaikov Aug 23, 2017

Contributor

there is chance that two shards are co-located in the same OSD. so i don't think we should dedup here.

This comment has been minimized.

Copy link
@xiexingguo

xiexingguo Aug 23, 2017

Author Member

Thanks for pointing out this for me, kefu. I confess that I don't understand the behaviour of EC-PGs well:-(

@@ -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 ||

This comment has been minimized.

Copy link
@tchaikov

tchaikov Aug 23, 2017

Contributor

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 "

This comment has been minimized.

Copy link
@tchaikov

tchaikov Aug 23, 2017

Contributor

lgtm.

@xiexingguo xiexingguo force-pushed the xiexingguo:wip-dedup-ec-want-acting branch from 966f462 to bc3e6e2 Aug 23, 2017

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

xiexingguo added some commits Aug 22, 2017

osd/PG: calc_ec_acting - kill "usable"
which has no consumers.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
osd/PG: calc_replicated_acting - better tips
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>

@yuriw yuriw merged commit 4d05884 into ceph:master Aug 24, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@xiexingguo xiexingguo deleted the xiexingguo:wip-dedup-ec-want-acting branch Aug 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.