]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: set could_consume to false when no purge queue item actually executed 22176/head
authorXuehan Xu <xuxuehan@360.cn>
Thu, 10 May 2018 04:22:24 +0000 (12:22 +0800)
committerPrashant D <pdhange@redhat.com>
Wed, 23 May 2018 10:46:51 +0000 (06:46 -0400)
Fixes: http://tracker.ceph.com/issues/24073
Signed-off-by: Xuehan Xu <xuxuehan@360.cn>
(cherry picked from commit 46b4e6afa631058fe066bfd58c76d644d5c2181d)

src/mds/PurgeQueue.cc

index 49e48b04cc6d12700a4ff97ab149177a8a2f5c2b..cec43ecd34704cc3972a5372712778d62b717203 100644 (file)
@@ -350,7 +350,6 @@ bool PurgeQueue::_consume()
 
   bool could_consume = false;
   while(can_consume()) {
-    could_consume = true;
 
     if (delayed_flush) {
       // We are now going to read from the journal, so any proactive
@@ -376,6 +375,7 @@ bool PurgeQueue::_consume()
       return could_consume;
     }
 
+    could_consume = true;
     // The journaler is readable: consume an entry
     bufferlist bl;
     bool readable = journaler.try_read_entry(bl);