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: some cleanups && add should_gather filter for loop logging #19546

Merged
merged 3 commits into from Jan 2, 2018

Conversation

ZVampirEM77
Copy link
Contributor

Three things:

  1. add should_gather filter before for loop logging in choose_acting

  2. use func instead of an explicit function name for dout in choose_acting

  3. clean up repeated calling and use func instead of an explicit function name for dout in calc_replicated_acting

Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
@@ -1237,10 +1237,11 @@ void PG::calc_replicated_acting(
set<pg_shard_t> *acting_backfill,
ostream &ss)
{
ss << "calc_acting newest update on osd." << auth_log_shard->first
pg_shard_t auth_log_shard_id = auth_log_shard->first;
Copy link
Contributor

Choose a reason for hiding this comment

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

what could be improved whit this local variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the local variable pg_shard_t auth_log_shard_id is already existent before, I just change the location of its definition to reduce calling times of auth_log_shard->first. I think there will be a little bit improvement (although it can be ignored) to execution efficiency, or at least it makes the code looks more clean.

@ZVampirEM77
Copy link
Contributor Author

@liewegas @tchaikov just some cleanups. do you mind to review this PR?

@liewegas liewegas changed the title PG: some cleanups && add should_gather filter for loop logging osd/PG: some cleanups && add should_gather filter for loop logging Dec 29, 2017
@tchaikov tchaikov merged commit 2d0a5dc into ceph:master Jan 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants