]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_test_objectstore: queue split on parent pg sequencer 23552/head
authorSage Weil <sage@redhat.com>
Tue, 14 Aug 2018 13:58:31 +0000 (08:58 -0500)
committerSage Weil <sage@redhat.com>
Tue, 14 Aug 2018 14:08:12 +0000 (09:08 -0500)
This matches the OSD.

It also ensure that we drain transactions that precede the split, which
will include any finish_write calls that might otherwise attach the
Buffer to the wrong cache shard: _txc_finish() calls finish_write and
passes the cache shard without the cache shard lock held, but may block
waiting for split_cache() which then changes the destination collection's
shard.  Once it gets the lock and proceeds it would operate on the wrong
cache shard, leading to a failed assert later when the sharedblob is
trimmed.

Fixes: http://tracker.ceph.com/issues/24439
Signed-off-by: Sage Weil <sage@redhat.com>
src/test/objectstore/store_test.cc

index 50595a01147ef3a3707e3d810b44de674dbb5341..c5456b3bc6b0b947a8e8dc7fb63f8afc34538da4 100644 (file)
@@ -5129,10 +5129,10 @@ void colsplittest(
     ObjectStore::Transaction t;
     t.create_collection(tid, common_suffix_size + 1);
     t.split_collection(cid, common_suffix_size+1, 1<<common_suffix_size, tid);
-    r = queue_transaction(store, tch, std::move(t));
+    r = queue_transaction(store, ch, std::move(t));
     ASSERT_EQ(r, 0);
   }
-  tch->flush();
+  ch->flush();
 
   ObjectStore::Transaction t;
   vector<ghobject_t> objects;