]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: do nothing when get a stale reply 44567/head
authorXiubo Li <xiubli@redhat.com>
Thu, 13 Jan 2022 04:03:39 +0000 (12:03 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 13 Jun 2022 08:19:48 +0000 (16:19 +0800)
In theory when we get a stale reply from incorrect session, that
means it's buggy in MDS. Anyway we should discard it without doing
anything.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/client/Client.cc

index 471ce3f8e3d324dec73aec80852a4f00f6ddb8fd..571b9fcb913f380c60e76c79ce6b0f128878d936 100644 (file)
@@ -2665,6 +2665,13 @@ void Client::handle_client_reply(const MConstRef<MClientReply>& reply)
   ldout(cct, 20) << __func__ << " got a reply. Safe:" << is_safe
                 << " tid " << tid << dendl;
 
+  // correct sessions ?
+  if (request->mds != mds_num) {
+    ldout(cct, 0) << "got a stale reply from mds." << mds_num
+            << " instead of mds." << request->mds << dendl;
+    return;
+  }
+
   if (request->got_unsafe && !is_safe) {
     //duplicate response
     ldout(cct, 0) << "got a duplicate reply on tid " << tid << " from mds "