]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/osd/RadosModel: do not set done
authorKefu Chai <kchai@redhat.com>
Mon, 24 Aug 2020 10:35:22 +0000 (18:35 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 30 Aug 2020 10:34:18 +0000 (18:34 +0800)
we don't reuse TestOp, and `done` should have been reset in the
constructor.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/test/osd/RadosModel.h

index 809cf65488176e77722c792d704fdaa14728b013..ae0efb373cdfab3322e8c6420543f12f673c08bb 100644 (file)
@@ -779,9 +779,9 @@ public:
                
   void _begin() override
   {
-    std::lock_guard state_locker{context->state_lock};
-    done = 0;
+    assert(!done);
     stringstream acc;
+    std::lock_guard state_locker{context->state_lock};
     acc << context->prefix << "OID: " << oid << " snap " << context->current_snap << std::endl;
     string prefix = acc.str();