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: more pg upmap fixes #21670
Conversation
retest this please |
map<int, float> weight_map; | ||
auto it = rule_weight_map.find(crush_rule); | ||
if (it == rule_weight_map.end()) { | ||
auto r = tmpmap.crush->get_rule_weight_osd_map(crush_rule, &weight_map); |
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.
this way is simple to find whether osd is in bucket
src/osd/OSDMap.cc
Outdated
<< "pg_upmap_items entry " | ||
<< "[" << osdmap.pg_upmap.find(pg)->first << ":" | ||
<< osdmap.pg_upmap.find(pg)->second << "]" | ||
<< dendl; |
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.
should be osdmap.pg_upmap_items.find(pg)
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.
@hjwsm1989 Thank you very much. Fixed!
There is too much code redundancy.. Signed-off-by: xiexingguo <xie.xingguo@gmail.com>
Fixes: http://tracker.ceph.com/issues/23878 Signed-off-by: xiexingguo <xie.xingguo@gmail.com>
pg_upmap/pg_upmap_items should not bring osds which no longer belong to a specific crush-tree in. Signed-off-by: xiexingguo <xie.xingguo@gmail.com>
Signed-off-by: xiexingguo <xie.xingguo@gmail.com>
Fixes: http://tracker.ceph.com/issues/23878