]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mimic: test/store_test: workaround for failing BlobReuseOnOverwrite UT
authorIgor Fedotov <ifedotov@suse.com>
Tue, 19 Mar 2019 18:23:31 +0000 (21:23 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 25 Apr 2019 08:39:49 +0000 (11:39 +0300)
Workarounds: https://tracker.ceph.com/issues/38795

Nautilus+ releases doesn't have the issue which is probably related to
modifications of BlueStore::MempoolThread::_trim_shards which introduces
different calculation for meta|data_alloc parameters

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/test/objectstore/store_test.cc

index d1e7c4f838b5949edf44c50ce1c4324700197fe9..c0341311c399f481e289767121b857bf5faaac20 100644 (file)
@@ -5947,10 +5947,20 @@ TEST_P(StoreTestSpecificAUSize, BlobReuseOnOverwrite) {
     return;
 
   size_t block_size = 4096;
-  StartDeferred(block_size);
+
   SetVal(g_conf, "bluestore_max_blob_size", "65536");
+  // need to tune cache autotune interval as lack of cache balancing
+  // triggers excessive cache trimming after fsck
+  // See https://tracker.ceph.com/issues/38795
+  SetVal(g_conf, "bluestore_cache_autotune_interval", "1");
   g_conf->apply_changes(NULL);
 
+  StartDeferred(block_size);
+
+  // wait 2xbluestore_cache_autotune_interval to make sure cache has been
+  // rebalanced
+  sleep(2);
+
   int r;
   coll_t cid;
   ghobject_t hoid(hobject_t("test_hint", "", CEPH_NOSNAP, 0, -1, ""));
@@ -6120,10 +6130,20 @@ TEST_P(StoreTestSpecificAUSize, BlobReuseOnOverwriteReverse) {
     return;
 
   size_t block_size = 4096;
-  StartDeferred(block_size);
+
   SetVal(g_conf, "bluestore_max_blob_size", "65536");
+  // need to tune cache autotune interval as lack of cache balancing
+  // triggers excessive cache trimming after fsck
+  // See https://tracker.ceph.com/issues/38795
+  SetVal(g_conf, "bluestore_cache_autotune_interval", "1");
   g_conf->apply_changes(NULL);
 
+  StartDeferred(block_size);
+
+  // wait 2xbluestore_cache_autotune_interval to make sure cache has been
+  // rebalanced
+  sleep(2);
+
   int r;
   coll_t cid;
   ghobject_t hoid(hobject_t("test_hint", "", CEPH_NOSNAP, 0, -1, ""));
@@ -6301,10 +6321,19 @@ TEST_P(StoreTestSpecificAUSize, BlobReuseOnSmallOverwrite) {
     return;
 
   size_t block_size = 4096;
-  StartDeferred(block_size);
   SetVal(g_conf, "bluestore_max_blob_size", "65536");
+  // need to tune cache autotune interval as lack of cache balancing
+  // triggers excessive cache trimming after fsck
+  // See https://tracker.ceph.com/issues/38795
+  SetVal(g_conf, "bluestore_cache_autotune_interval", "1");
   g_conf->apply_changes(NULL);
 
+  StartDeferred(block_size);
+
+  // wait 2xbluestore_cache_autotune_interval to make sure cache has been
+  // rebalanced
+  sleep(2);
+
   int r;
   coll_t cid;
   ghobject_t hoid(hobject_t("test_hint", "", CEPH_NOSNAP, 0, -1, ""));