]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/osd: fix the order in OSD::update_heartbeat_peers()
authorKefu Chai <kchai@redhat.com>
Thu, 19 Sep 2019 08:10:54 +0000 (16:10 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 19 Sep 2019 10:23:20 +0000 (18:23 +0800)
commit4aed49b6261904554116a7258914a94d3d62570f
treeb18e5d2e99f099bd78f7283b2fe154be461666ca
parentb102c44291902bd070a2c7df9ae00143a9e8d36f
crimson/osd: fix the order in OSD::update_heartbeat_peers()

before this chance, we do following things in background and in
parallel:

* add peers from pg map
* and peers from whole osdmap
* remove dead peers

but we should prioritize the peer candidates, apparently, the ones from
pgmap should have higher priority. as they are more likely to be used in
cluser and they are more important to current OSD, as they serve the
same set of PGs.

so we need to do these things in a proper order:

1. add peers from pg map
2. and peers from whole osdmap
3. remove dead peers

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd.cc
src/crimson/osd/osd.h