]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr: tolerate racing config-key change during load_store()
authorSage Weil <sage@redhat.com>
Tue, 5 Jun 2018 17:55:52 +0000 (12:55 -0500)
committerSage Weil <sage@redhat.com>
Sat, 9 Jun 2018 19:25:22 +0000 (14:25 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/Mgr.cc

index f8a2e2fba3402271e92b3fd86accb2979b75f93e..cc14eac3a0f21806cf5f66a0e1ce98a6e5b008ad 100644 (file)
@@ -184,8 +184,9 @@ std::map<std::string, std::string> Mgr::load_store()
       lock.Unlock();
       get_cmd.wait();
       lock.Lock();
-      assert(get_cmd.r == 0);
-      loaded[key] = get_cmd.outbl.to_str();
+      if (get_cmd.r == 0) { // tolerate racing config-key change
+       loaded[key] = get_cmd.outbl.to_str();
+      }
     }
   }