]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap: fix PGMapDigest decode 22066/head
authorSage Weil <sage@redhat.com>
Thu, 17 May 2018 15:51:46 +0000 (10:51 -0500)
committerSage Weil <sage@redhat.com>
Thu, 17 May 2018 15:51:46 +0000 (10:51 -0500)
The compat path wasn't clearing the map before filling in new entries.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMap.cc

index 6cc8f86443778c5f1b87dfdc8919477d70e6f7dc..39090d5715396218e208043a33ce14c49909b2e3 100644 (file)
@@ -78,6 +78,7 @@ void PGMapDigest::decode(bufferlist::iterator& p)
   } else {
     map<int32_t, int32_t> nps;
     decode(nps, p);
+    num_pg_by_state.clear();
     for (auto i : nps) {
       num_pg_by_state[i.first] = i.second;
     }