]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: return correct result for non-logkey entries
authormyoungwon oh <ohmyoungwon@gmail.com>
Tue, 24 Feb 2026 04:03:01 +0000 (13:03 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Tue, 17 Mar 2026 08:05:08 +0000 (17:05 +0900)
Signed-off-by: Myoungwon Oh <ohmyoungwon@gmail.com>
src/crimson/os/seastore/omap_manager/log/log_node.cc
src/test/crimson/seastore/test_seastore.cc

index 4e5363a1d934aa2b26df54583978075978d384fd..fa6b39db24fff7bb8404a3f4f751c3537755a789 100644 (file)
@@ -211,6 +211,7 @@ LogNode::get_value_ret LogNode::get_value(const std::string &key)
     const auto k = ent.get_key();
     if (k == key) {
       bl = ent.get_val();
+      found = true;
       /* If key is time-series log,
        * duplicate does not exist. In this case, return latest one */
       if (is_log_key(k)) {
@@ -235,6 +236,7 @@ bool LogNode::remove_entry(const std::string key)
 {
   auto iter = iter_begin();
   uint32_t index = 0;
+  bool removed = false;
   while(iter != iter_end()) {
     if (iter->get_key() == key) {
       set_cur_bitmap(index, index);
@@ -243,11 +245,12 @@ bool LogNode::remove_entry(const std::string key)
       if (is_log_key(key)) {
        return true;
       }
+      removed = true;
     }
     index++;
     iter++;
   };
-  return false;
+  return removed;
 }
 
 bool LogNode::log_less_than(std::string_view str) const
index 5ddd4bcd64506ff54b3cab252b5a893090f3bc7a..506e19cd68f840380238279136c627cf4c7335f1 100644 (file)
@@ -1968,6 +1968,17 @@ TEST_P(seastore_test_t, pgmeta_io)
       }
     }
     ASSERT_TRUE(crimson::os::seastore::log_manager::is_continuous_fixed_width(keys));
+
+    {
+      CTransaction t;
+      bufferlist bl;
+      std::string key = "missing/0000000000000003.E915304E.head.benchmark%udata%utrial165%u44927%uobject62";
+      bl.append(std::string(128, 'f'));
+      test_obj.set_omap(t, key, bl);
+      do_transaction(std::move(t));
+      test_obj.check_omap_key(*sharded_seastore, key);
+      test_obj.rm_omap_range(*sharded_seastore, key, key);
+    }
   });
 }