]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: fix bluestore unshare blob test case 44423/head
authorTongliang Deng <dengtongliang@gmail.com>
Wed, 29 Dec 2021 12:37:55 +0000 (20:37 +0800)
committerTongliang Deng <dengtongliang@gmail.com>
Wed, 29 Dec 2021 13:34:18 +0000 (21:34 +0800)
Ensure async queue_transactions of remove op on cloned
object happens before KV range scan, otherwise assertion
on the number of shared blob may failed.

Signed-off-by: Tongliang Deng <dengtongliang@sensetime.com>
src/test/objectstore/store_test.cc

index ca940b1aab783430232877dec46691ae5d53efba..e9717fefeb3d58c29fae730ed92bf25de019c712 100644 (file)
@@ -3807,6 +3807,13 @@ TEST_P(StoreTest, BlueStoreUnshareBlobTest) {
     r = queue_transaction(store, ch, std::move(t4));
     ASSERT_EQ(r, 0);
 
+    {
+      // this ensures remove operation submitted to kv store
+      EXPECT_EQ(store->umount(), 0);
+      EXPECT_EQ(store->mount(), 0);
+      ch = store->open_collection(cid);
+    }
+
     bufferlist resdata;
     r = store->read(ch, hoid, 0, 0x2000, resdata);
     ASSERT_EQ(r, 0x2000);