]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon/OSDMonitor: account for PG merging in epoch_by_pg accounting
authorDan van der Ster <daniel.vanderster@cern.ch>
Thu, 1 Jul 2021 14:12:26 +0000 (16:12 +0200)
committerDan van der Ster <daniel.vanderster@cern.ch>
Wed, 7 Jul 2021 11:24:00 +0000 (13:24 +0200)
commitcf5ea22cc0b10560c9fa3fbd5d93431f874d38b9
tree47e1073c80cd378a6ed2fb71a00d1fc7c263793a
parent0b361349956699bd51310a329954ec97013aee71
mon/OSDMonitor: account for PG merging in epoch_by_pg accounting

After a pool has merged PGs, the epoch_by_pg accounting will refer
to osdmap epochs of PGs that no longer exist. We'll never again get
OSD beacons for these PGs, so the min epoch in epoch_by_pg will not
advance until the mon leader has restarted. The effect of this is
that osdmaps are not trimmed after a pool has undergone PG merging,
until the mon leader restarts. To fix, we unconditionally resize
epoch_by_pg to the pg_num of the pool during each beacon report.

Fixes: https://tracker.ceph.com/issues/48212
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h