]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/DaemonServer: skip redundant update of pgp_num_actual 42105/head
authorDan van der Ster <daniel.vanderster@cern.ch>
Tue, 29 Jun 2021 20:36:00 +0000 (22:36 +0200)
committerDan van der Ster <daniel.vanderster@cern.ch>
Tue, 29 Jun 2021 21:00:33 +0000 (23:00 +0200)
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 <daniel.vanderster@cern.ch>
src/mgr/DaemonServer.cc

index 334badc264e03da857e40666de4fd1ea7c7b48d7..a9d785177c1c067f98ed5d47dea7131ac0988e9f 100644 (file)
@@ -2859,11 +2859,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) {