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/OSDMap: improve the performance of pg_to_acting_osds #12190
Conversation
The case is: when pg temp is not empty, acting will be calculated without ups and up_primary. But ups and up_primary are always calculated, and affect the performance at this situation. |
I find one thing very weird. I created this pr yesterday morning, and found one testcase failed when ran jekins: So I had to close this pr, and investigated what was wrong, but nothing found. When I reopened this pr without any changes, jekins passed.... Anyone could give me any idea? |
@liupan1111 there are still some issues with the unit tests; it sounds like it wasn't caused by this change. |
_raw_to_up_osds(*pool, raw, &_up, &_up_primary); | ||
_apply_primary_affinity(pps, *pool, &_up, &_up_primary); | ||
if (_acting.empty()) { | ||
_acting = _up; |
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.
indentation?
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.
@liupan1111 ping?
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.
and could you fix the Signed-off-by line in your commit message? or just squash these two commits into a single one?
_acting = _up; | ||
if (_acting_primary == -1) { | ||
_acting_primary = _up_primary; | ||
} | ||
} | ||
} | ||
if (up) |
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.
you could mvoe the if (up) and if (up_prmiary) lines into the block?
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.
a cosmetic changes, otherwise lgtm
@liewegas , modified as your request. |
_raw_to_up_osds(*pool, raw, &_up, &_up_primary); | ||
_apply_primary_affinity(pps, *pool, &_up, &_up_primary); | ||
if (_acting.empty()) { | ||
_acting = _up; |
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.
@liupan1111 could you fix the indent?
@tchaikov done, thanks! |
@liupan1111 could you fix the signed-off-by line in 993d37d, or better off squashing these two commit into a single one? |
@tchaikov what is wrong with signed-off-by? |
- Signed-off-by: Pan Liu pan.liu@istuary.com
+ Signed-off-by: Pan Liu <pan.liu@istuary.com> |
Signed-off-by: Pan Liu <pan.liu@istuary.com>
@tchaikov modified. |
…up vector" is not requested.
Signed-off-by: Pan Liu pan.liu@istuary.com