]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/OSDMonitor: account for PG merging in epoch_by_pg accounting 42224/head
authorDan van der Ster <daniel.vanderster@cern.ch>
Thu, 1 Jul 2021 14:12:26 +0000 (16:12 +0200)
committerCory Snyder <csnyder@iland.com>
Wed, 7 Jul 2021 17:17:01 +0000 (13:17 -0400)
commitd29fd74b77a411b7a1ee38c21fcc2e30b9fdeb43
treedd2e7c86d0dfc07eb6b5a60123fde1e77ba8740a
parent2da4f0a00259e70842bd8c8408e9267833b68856
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