]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson/seastore/test_omap_manager: add a UT to reproduce issue 72303
authorChanyoung Park <chaney.p@kakaoenterprise.com>
Tue, 29 Jul 2025 08:25:14 +0000 (08:25 +0000)
committerChanyoung Park <chaney.p@kakaoenterprise.com>
Tue, 29 Jul 2025 16:10:01 +0000 (16:10 +0000)
Signed-off-by: Chanyoung Park <chaney.p@kakaoenterprise.com>
src/test/crimson/seastore/test_omap_manager.cc

index 1237cae30862e91fea52e1de054d85152bf096b2..cb5b57eff88d1a0c6ae4762021a8b07624d98efe 100644 (file)
@@ -816,6 +816,28 @@ TEST_P(omap_manager_test_t, full_range_list)
   });
 }
 
+TEST_P(omap_manager_test_t, increasing_key_size)
+{
+  // reproduces https://tracker.ceph.com/issues/72303
+  run_async([this] {
+    omap_root_t omap_root = initialize();
+
+    for (int i = 0; i < 1000; i++) {
+      auto t = create_mutate_transaction();
+      std::string key(i, 'A');
+      set_key(omap_root, *t, key, rand_buffer(1024));
+      submit_transaction(std::move(t));
+    }
+    check_mappings(omap_root);
+
+    while (test_omap_mappings.size() > 0) {
+      auto t = create_mutate_transaction();
+      rm_key(omap_root, *t, test_omap_mappings.begin()->first);
+      submit_transaction(std::move(t));
+    }
+  });
+}
+
 INSTANTIATE_TEST_SUITE_P(
   omap_manager_test,
   omap_manager_test_t,