]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: fix split ordering
authorSage Weil <sage@redhat.com>
Mon, 12 Feb 2018 23:50:42 +0000 (17:50 -0600)
committerSage Weil <sage@redhat.com>
Fri, 16 Feb 2018 18:37:30 +0000 (12:37 -0600)
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 <sage@redhat.com>
src/test/objectstore/store_test.cc

index 81c03e88f0065a0d8996d53cc8d03237050b6154..0f43c6d72e55c4711674d0b0189730abda028bab 100644 (file)
@@ -5174,6 +5174,7 @@ void colsplittest(
     r = queue_transaction(store, tch, std::move(t));
     ASSERT_EQ(r, 0);
   }
+  tch->flush();
 
   ObjectStore::Transaction t;
   vector<ghobject_t> 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);