]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: PeeringState: fix selection order in calc_replicated_acting_stretch 44664/head
authorGreg Farnum <gfarnum@redhat.com>
Tue, 11 Jan 2022 00:10:36 +0000 (00:10 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Wed, 19 Jan 2022 13:55:37 +0000 (13:55 +0000)
commit7f99d8997abe24232e96464eb7b47091e13a5e03
treef01046f6244b25880104c819e3c4c3169976fdce
parent5373f95aa9de52712fabd28dfbb34d512b5bfdf3
osd: PeeringState: fix selection order in calc_replicated_acting_stretch

We were previously mis-ordering these to *de*prioritize the existing acting set. That is bad!

We generate OSD candidates from the acting set and strays, and push
them into the candidates list as a tuple of <<!in_acting,pg_info.last_update>,osd_id>.

Then we sort the list. Then we go through the list from front to back and
push_back entries into the appropriate ancestor lists.

And then we pop_back() off the lists to select the acting set.
Which of course turns our nice careful order backwards! So don't do that.

Fixes: https://tracker.ceph.com/issues/53824
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 0af5eb6d31add3ba5e9dc8261657b2b3d6f45ad0)
src/osd/PeeringState.cc