]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson/seastore/test_omap_manager: add a UT to reproduce issue 72270 64675/head
authorChanyoung Park <chaney.p@kakaoenterprise.com>
Mon, 28 Jul 2025 15:37:43 +0000 (15:37 +0000)
committerChanyoung Park <chaney.p@kakaoenterprise.com>
Sun, 10 Aug 2025 08:41:38 +0000 (08:41 +0000)
Signed-off-by: Chanyoung Park <chaney.p@kakaoenterprise.com>
src/test/crimson/seastore/test_omap_manager.cc

index 6f836f8d0f3c05a4982831e014caf12dfb6b443f..d82ac2ddf80575b12bb8e0ff8297e57c2ef5c164 100644 (file)
@@ -837,6 +837,28 @@ TEST_P(omap_manager_test_t, full_range_list)
   });
 }
 
+TEST_P(omap_manager_test_t, long_key_stress_test)
+{
+  // reproduces https://tracker.ceph.com/issues/72270
+  run_async([this] {
+    omap_root_t omap_root = initialize();
+
+    size_t target_size = 10 * 1000; // 10MB
+    while (test_omap_mappings.size() < target_size) {
+      auto t = create_mutate_transaction();
+      for (unsigned i = 0; i < 64; i++) {
+        auto key = rand_name(1000);
+        set_key(omap_root, *t, key, rand_buffer(1));
+        key = rand_name(1000);
+        set_key(omap_root, *t, key, rand_buffer(1));
+        rm_key(omap_root, *t, test_omap_mappings.begin()->first);
+      }
+      submit_transaction(std::move(t));
+    }
+    check_mappings(omap_root);
+  });
+}
+
 TEST_P(omap_manager_test_t, increasing_key_size)
 {
   // reproduces https://tracker.ceph.com/issues/72303