]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: account for PG merging in epoch_by_pg accounting 42837/head
authorDan van der Ster <daniel.vanderster@cern.ch>
Thu, 1 Jul 2021 14:12:26 +0000 (16:12 +0200)
committerStephen Taylor <steveftaylor@gmail.com>
Fri, 20 Aug 2021 18:00:07 +0000 (12:00 -0600)
commitf30d1c43656c4b079d6d14a40dc5ad2d1a1892ab
treed3fc03648971aedb1293bee3ce91f736e134057a
parent39aebff86be5ef88eb5797eb77d473b680f4acaa
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>
(cherry picked from commit cf5ea22cc0b10560c9fa3fbd5d93431f874d38b9)
src/mon/OSDMonitor.cc
src/mon/OSDMonitor.h