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: miscellaneous choose acting changes and cleanups #18481

Merged
merged 5 commits into from Oct 25, 2017

Conversation

Projects
None yet
4 participants
@xiexingguo
Copy link
Member

commented Oct 23, 2017

No description provided.

xiexingguo added some commits Oct 19, 2017

osd/PG: drop want_primary from calc_replicated[ec]_acting
This is generally not necessary because the first valid
osd in want set will be chosen as primary!

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
osd/PG: caluculate acting by comparing with oldest log entry of auth
In GetLog, we will request logs back to the min last_update over our
acting_backfill set, which will result in our log being extended
as far backwards as necessary to pick up any peers which can
be log recovered by auth_log_shard's log.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>

@xiexingguo xiexingguo added the core label Oct 23, 2017

@xiexingguo xiexingguo requested a review from liewegas Oct 23, 2017

@liewegas
Copy link
Member

left a comment

I'm not totally sure we should kill the primary output argument. Currently, yes, we just pick the first one as the primary, but the plan was to eventually be a bit smarter about it. For LRC, for example, we should pick a primary within the local segment that is doing recovery. That shouldn't be very hard to fix and will make LRC much more effective.

@xiexingguo xiexingguo force-pushed the xiexingguo:wip-choose-acting branch from a19a34e to 46bfe36 Oct 24, 2017

acting_backfill->insert(s);
ss << " shard " << s << " (acting) accepted "
<< all_info.find(s)->second << std::endl;
usable++;

This comment has been minimized.

Copy link
@xiexingguo

xiexingguo Oct 24, 2017

Author Member

Sorry, in the previous version I forget to increase usable here and below. Need to be retested.

xiexingguo added some commits Oct 16, 2017

osd/osd_type.h: kill pg_missing_set.have_old
which has no consumers, and removing the unused code should
always be the preferred option.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
os/PG: choose replicated acting by last_update
Candidate which has a newer last_update should take precedence,
since it can be technically brought back to normal sooner than others.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
osd/osd_type: kill log.approx_size()
We used approx_size() because std::list::size() used to be O(n) instead of O(1),
but it is constant now in C++11.

Also counting the precise number of current log entries here is much more
meaningful.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>

@tchaikov tchaikov merged commit 4b6406b into ceph:master Oct 25, 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-choose-acting branch Oct 25, 2017

@xiexingguo

This comment has been minimized.

Copy link
Member Author

commented Oct 25, 2017

@tchaikov Thanks!

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.