]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: OSDMonitor: wait proposal finished if thrash succeeds
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 7 Mar 2016 15:24:50 +0000 (23:24 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 7 Apr 2016 09:31:42 +0000 (17:31 +0800)
By returning true, the thrash() method indicates caller that
it has modified the pending_inc and we shall waiting for the
changes to take effect, which is the most normal behaviour when we
receive and successfully perform a command from caller.

The problem here is that we discard the result of thrash() method
unconditionly here, and thus we shall always fall through to "reply"
instead of "update", which is the expecting action when thrash()
succeeds as mentioned above.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/OSDMonitor.cc

index b87b567b15203be8b012aabc4556cb1168f3393c..1ef1670293b17c0f8356e66042d9546b092d84b8 100644 (file)
@@ -7643,6 +7643,8 @@ done:
     ss << "will thrash map for " << thrash_map << " epochs";
     ret = thrash();
     err = 0;
+    if (ret)
+      goto update;
   } else {
     err = -EINVAL;
   }