]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: clear resend_mds only after sending request 57174/head
authorPatrick Donnelly <pdonnell@redhat.com>
Mon, 22 Apr 2024 17:46:43 +0000 (13:46 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 30 Apr 2024 17:18:37 +0000 (13:18 -0400)
The client may not be able to immediately send the request after learning the
target; e.g. the target rank has no session yet or is otherwise temporarily
unavailable.

Fixes: https://tracker.ceph.com/issues/65614
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 3a3227adb52624ae3a39e78921d3a17114e1b404)

src/client/Client.cc

index ba41e9dd084625a845c85ab1453cfad8bbdb64b2..bec485e9b02e1fed7d28e3a8ae7c3dceb00fd207 100644 (file)
@@ -1692,7 +1692,6 @@ mds_rank_t Client::choose_target_mds(MetaRequest *req, Inode** phash_diri)
 
   if (req->resend_mds >= 0) {
     mds = req->resend_mds;
-    req->resend_mds = -1;
     ldout(cct, 10) << __func__ << " resend_mds specified as mds." << mds << dendl;
     goto out;
   }
@@ -2048,6 +2047,7 @@ int Client::make_request(MetaRequest *request,
 
     // wait for signal
     ldout(cct, 20) << "awaiting reply|forward|kick on " << &caller_cond << dendl;
+    request->resend_mds = -1; /* reset for retries */
     request->kick = false;
     std::unique_lock l{client_lock, std::adopt_lock};
     caller_cond.wait(l, [request] {