]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Add tailing closing square bracket once in handle_command_reply
authorJimyeong Lee <jinmyeong.lee@linecorp.com>
Wed, 2 Aug 2023 00:17:07 +0000 (09:17 +0900)
committerJinmyeong Lee <jinmyeong.lee@linecorp.com>
Fri, 15 Sep 2023 03:06:14 +0000 (12:06 +0900)
Delete unnecessary method, Add multi_id to logs

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

index 55aa1b415b83331c077b9f323eb12e1fd383af1e..2cc4a33a247df93a32ac34b1d5b059a6b451195c 100644 (file)
@@ -6403,7 +6403,7 @@ int Client::mds_command(
       op.con = conn;
 
       ldout(cct, 4) << __func__ << ": new command op to " << target_gid
-        << " tid=" << op.tid << cmd << dendl;
+        << " tid=" << op.tid << " multi_id=" << op.multi_target_id << " "<< cmd << dendl;
 
       // Construct and send MCommand
       MessageRef m = op.get_message(monclient->get_fsid());
@@ -6429,7 +6429,7 @@ void Client::handle_command_reply(const MConstRef<MCommandReply>& m)
   }
 
   auto &op = command_table.get_command(tid);
-  ceph_tid_t multi_id = command_table.get_multi_target_id(tid);
+  ceph_tid_t multi_id = op.multi_target_id;
 
   if (op.outbl) {
     if (multi_id != 0 && m->r == 0) {
@@ -6452,7 +6452,7 @@ void Client::handle_command_reply(const MConstRef<MCommandReply>& m)
     }
     else {
       // when this command is the last one
-      if (command_table.count_multi_commands(multi_id) <= 1) {
+      if (command_table.count_multi_commands(multi_id) == 1) {
         op.outbl->append("]");
       }
     }
index cf57ee5e0ac3a73347b9f8ef64bc67f18d33f743..e777d72dcf56b99bec4d9b8469066e12b5eafdf1 100644 (file)
@@ -122,11 +122,6 @@ public:
     return commands.at(tid);
   }
 
-  bool get_multi_target_id(ceph_tid_t tid) const
-  {
-    return commands.at(tid).multi_target_id;
-  }
-
   void erase(ceph_tid_t tid)
   {
     ceph_tid_t multi_id = commands.at(tid).multi_target_id;