]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Adjust multi_targets map assert condition
authorJimyeong Lee <jinmyeong.lee@linecorp.com>
Tue, 1 Aug 2023 23:07:27 +0000 (08:07 +0900)
committerJinmyeong Lee <jinmyeong.lee@linecorp.com>
Fri, 15 Sep 2023 03:06:13 +0000 (12:06 +0900)
When access to map, even do not add element to set of map, the set is initiated,
so make the assert condition reasonable.

Signed-off-by: Jimyeong Lee <jinmyeong.lee@linecorp.com>
src/common/CommandTable.h

index 672161af65229b1b80d78de84a0001acbb55904e..cf57ee5e0ac3a73347b9f8ef64bc67f18d33f743 100644 (file)
@@ -80,7 +80,9 @@ public:
   ~CommandTable()
   {
     ceph_assert(commands.empty());
-    ceph_assert(multi_targets.empty());
+    for (const auto& pair : multi_targets) {
+      ceph_assert(pair.second.empty());
+    }
   }
 
   ceph_tid_t get_new_multi_target_id()