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
Conversation
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; |
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.
what could be improved whit this local variable?
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.
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.
Three things:
add should_gather filter before for loop logging in choose_acting
use func instead of an explicit function name for
dout
in choose_actingclean up repeated calling and use func instead of an explicit function name for
dout
in calc_replicated_acting