]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
osd: PeeringState: fix calc_replicated_acting_stretch() syntax/logic
authorGreg Farnum <gfarnum@redhat.com>
Thu, 11 Mar 2021 10:26:47 +0000 (10:26 +0000)
committerGreg Farnum <gfarnum@redhat.com>
Fri, 12 Mar 2021 20:58:52 +0000 (20:58 +0000)
commitd09253081f7703fcb5a1bebce8840b489a3fc3ab
tree8796e08dabafa40f7f1474668e58173c2a8408dc
parentc5f3cca9fe30148a5630bb42588d488817df05af
osd: PeeringState: fix calc_replicated_acting_stretch() syntax/logic

There was a major error here! get_ancestor() was type-deduced to return
a bucket_candidates_t -- a *copy* of what was in the map, not the reference
to it we wanted to actually amend!

Fix this by returning a pointer instead. There's a way to coerce things
to return a reference instead but the syntax seems clumsier to me
and I'm not familiar with it anyway -- this works just fine.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
src/osd/PeeringState.cc