]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't delay processing completed requests in replay queue 19018/head
authorYan, Zheng <zyan@redhat.com>
Mon, 20 Nov 2017 00:29:12 +0000 (08:29 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 20 Nov 2017 01:01:42 +0000 (09:01 +0800)
Completed requests can also be in replay queue, they need to be processed
(treated as lookup request) in clientreplay stage. MDS will be stuck at
clientreplay stage if it delays processing requests of this type.

the bug was introduced by commit 0afbc033
(mds: don't rdlock locks in replica object while auth mds is recovering)

Fixes: http://tracker.ceph.com/issues/22163
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/Locker.cc
src/mds/Mutation.cc
src/mds/Mutation.h

index 388f6a58bcf43bfd6377226cef16954ef5fd4db3..3f628f96057bc232b79a213b2a1f6f6b8b0db646 100644 (file)
@@ -235,7 +235,7 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
          lock->get_type() == CEPH_LOCK_IPOLICY) &&
        mds->is_cluster_degraded() &&
        mdr->is_master() &&
-       !mdr->is_replay()) {
+       !mdr->is_queued_for_replay()) {
       // waiting for recovering mds, to guarantee replayed requests and mksnap/setlayout
       // get processed in proper order.
       bool wait = false;
@@ -587,7 +587,7 @@ bool Locker::acquire_locks(MDRequestRef& mdr,
       assert(mdr->is_master());
       if ((*p)->needs_recover()) {
        if (mds->is_cluster_degraded()) {
-         if (!mdr->is_replay()) {
+         if (!mdr->is_queued_for_replay()) {
            // see comments in SimpleLock::set_state_rejoin() and
            // ScatterLock::encode_state_for_rejoin()
            drop_locks(mdr.get());
index 4e26b515896a209123a6dfe86ce460d6923bd40a..52c0ca2339da815238c24733546a233232db96c0 100644 (file)
@@ -313,9 +313,9 @@ void MDRequestImpl::set_filepath2(const filepath& fp)
   more()->filepath2 = fp;
 }
 
-bool MDRequestImpl::is_replay() const
+bool MDRequestImpl::is_queued_for_replay() const
 {
-  return client_request ? client_request->is_replay() : false;
+  return client_request ? client_request->is_queued_for_replay() : false;
 }
 
 void MDRequestImpl::print(ostream &out) const
index 4738f8a5c19600b479ad98773436576e95290f55..abf0078d78a306f0cde6b99ca1643c9880334fb0 100644 (file)
@@ -331,7 +331,7 @@ struct MDRequestImpl : public MutationImpl {
   const filepath& get_filepath2();
   void set_filepath(const filepath& fp);
   void set_filepath2(const filepath& fp);
-  bool is_replay() const;
+  bool is_queued_for_replay() const;
 
   void print(ostream &out) const override;
   void dump(Formatter *f) const override;