From: Sage Weil Date: Mon, 12 Feb 2018 23:50:42 +0000 (-0600) Subject: ceph_test_objectstore: fix split ordering X-Git-Tag: v13.0.2~222^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=03e1fae32ca36db49d1e607827594a42ee9c6fa1;p=ceph.git ceph_test_objectstore: fix split ordering We need to flush between split. This requirement unfortunately doesn't quite go away with the FileStore tracking. Also, flush for each batch. This is just because the test environment may have a low open file ulimit. (The old code did apply_transaction, so it's functionally equivalent to this.) Signed-off-by: Sage Weil --- diff --git a/src/test/objectstore/store_test.cc b/src/test/objectstore/store_test.cc index 81c03e88f0065..0f43c6d72e55c 100644 --- a/src/test/objectstore/store_test.cc +++ b/src/test/objectstore/store_test.cc @@ -5174,6 +5174,7 @@ void colsplittest( r = queue_transaction(store, tch, std::move(t)); ASSERT_EQ(r, 0); } + tch->flush(); ObjectStore::Transaction t; vector objects; @@ -5192,9 +5193,16 @@ void colsplittest( r = queue_transaction(store, ch, std::move(t)); ASSERT_EQ(r, 0); t = ObjectStore::Transaction(); + + // test environment may have a low open file limit + ch->flush(); } } + t.remove_collection(cid); + r = queue_transaction(store, ch, std::move(t)); + t = ObjectStore::Transaction(); + objects.clear(); r = store->collection_list(tch, ghobject_t(), ghobject_t::get_max(), INT_MAX, &objects, 0); @@ -5210,10 +5218,12 @@ void colsplittest( r = queue_transaction(store, tch, std::move(t)); ASSERT_EQ(r, 0); t = ObjectStore::Transaction(); + + // test environment may have a low open file limit + tch->flush(); } } - t.remove_collection(cid); t.remove_collection(tid); r = queue_transaction(store, tch, std::move(t)); ASSERT_EQ(r, 0);