]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/PeeringState: fix wrong history of merge target 29835/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 22 Aug 2019 07:21:17 +0000 (15:21 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 22 Aug 2019 07:45:58 +0000 (15:45 +0800)
commitd47386c3145d3d4c4ace630ce7b48e552c5f2a5a
tree1043079edb18566e7bf13b482af193e38be36f5b
parentea216e52f663b04c948f2d43e2736ef2bcb9b04b
osd/PeeringState: fix wrong history of merge target

The merge target could be a stray pg that has never got the chance
to finish a complete peering cycle (we never purge strays before merge
is done) and hence leaving a zeroed last_epoch_started in the info.

In case the merge target incorrectly absorbs an invalid history in,
e.g., from an actual placeholder merge source pg, use

    history.epoch_created == 0

to identify if the merge target is truly a placeholder instead.

Fixes: https://tracker.ceph.com/issues/37654
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PeeringState.cc