From 03e1fae32ca36db49d1e607827594a42ee9c6fa1 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 12 Feb 2018 17:50:42 -0600 Subject: [PATCH] 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 --- src/test/objectstore/store_test.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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); -- 2.39.5