do_matrix(m, store);
}
+TEST_P(StoreTest, ZipperPatternSharded) {
+ if(string(GetParam()) != "bluestore")
+ return;
+ g_conf->set_val("bluestore_min_alloc_size", "4096");
+ g_ceph_context->_conf->apply_changes(NULL);
+ int r = store->umount();
+ ASSERT_EQ(r, 0);
+ r = store->mount(); //to force min_alloc_size update
+ ASSERT_EQ(r, 0);
+
+ ObjectStore::Sequencer osr("test");
+ coll_t cid;
+ ghobject_t a(hobject_t(sobject_t("Object 1", CEPH_NOSNAP)));
+ {
+ ObjectStore::Transaction t;
+ t.create_collection(cid, 0);
+ cerr << "Creating collection " << cid << std::endl;
+ r = apply_transaction(store, &osr, std::move(t));
+ ASSERT_EQ(r, 0);
+ }
+ bufferlist bl;
+ int len = 4096;
+ bufferptr bp(len);
+ bp.zero();
+ bl.append(bp);
+ for (int i=0; i<1000; ++i) {
+ ObjectStore::Transaction t;
+ t.write(cid, a, i*2*len, len, bl, 0);
+ r = apply_transaction(store, &osr, std::move(t));
+ ASSERT_EQ(r, 0);
+ }
+ for (int i=0; i<1000; ++i) {
+ ObjectStore::Transaction t;
+ t.write(cid, a, i*2*len + 1, len, bl, 0);
+ r = apply_transaction(store, &osr, std::move(t));
+ ASSERT_EQ(r, 0);
+ }
+ {
+ ObjectStore::Transaction t;
+ t.remove(cid, a);
+ t.remove_collection(cid);
+ cerr << "Cleaning" << std::endl;
+ r = apply_transaction(store, &osr, std::move(t));
+ ASSERT_EQ(r, 0);
+ }
+ g_conf->set_val("bluestore_min_alloc_size", "0");
+ g_ceph_context->_conf->apply_changes(NULL);
+}
+
TEST_P(StoreTest, SyntheticMatrixCsumAlgorithm) {
if (string(GetParam()) != "bluestore")
return;