From: Dan van der Ster Date: Tue, 29 Jun 2021 20:36:00 +0000 (+0200) Subject: mgr/DaemonServer: skip redundant update of pgp_num_actual X-Git-Tag: v16.2.6~145^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42223%2Fhead;p=ceph.git mgr/DaemonServer: skip redundant update of pgp_num_actual During PG merge the MGR was observed repeatedly sending identical set pgp_num_actual values, leading to osdmap churn at 2000/hr. Skip the redundant osd set pgp_num_actual command if the pgp_num is already our computed next. Fixes: https://tracker.ceph.com/issues/51433 Signed-off-by: Dan van der Ster (cherry picked from commit 3f15749de0d550a124f8c6afbd457f17ef020963) --- diff --git a/src/mgr/DaemonServer.cc b/src/mgr/DaemonServer.cc index 48816578ccb5..48534f896ac4 100644 --- a/src/mgr/DaemonServer.cc +++ b/src/mgr/DaemonServer.cc @@ -2867,11 +2867,13 @@ void DaemonServer::adjust_pgs() } } } - dout(10) << "pool " << i.first - << " pgp_num_target " << p.get_pgp_num_target() - << " pgp_num " << p.get_pgp_num() - << " -> " << next << dendl; - pgp_num_to_set[osdmap.get_pool_name(i.first)] = next; + if (next != p.get_pgp_num()) { + dout(10) << "pool " << i.first + << " pgp_num_target " << p.get_pgp_num_target() + << " pgp_num " << p.get_pgp_num() + << " -> " << next << dendl; + pgp_num_to_set[osdmap.get_pool_name(i.first)] = next; + } } } if (left == 0) {