]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/transaction: more logs about inconsistent 63218/head
authorXuehan Xu <xuxuehan@qianxin.com>
Mon, 19 May 2025 03:43:13 +0000 (11:43 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Fri, 30 May 2025 05:27:55 +0000 (13:27 +0800)
retired_placeholder

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/transaction.h

index 104021b9ba388fa67a30c62c29e9be820cf18ec3..b8505493fffabb48f4a6af204e9501cdfe16c9b8 100644 (file)
@@ -294,6 +294,7 @@ public:
   }
 
   void replace_placeholder(CachedExtent& placeholder, CachedExtent& extent) {
+    LOG_PREFIX(Transaction::replace_placeholder);
     ceph_assert(!is_weak());
 
     assert(is_retired_placeholder_type(placeholder.get_type()));
@@ -303,8 +304,17 @@ public:
     assert(extent.get_paddr().is_absolute());
     {
       auto where = read_set.find(placeholder.get_paddr(), extent_cmp_t{});
-      assert(where != read_set.end());
-      assert(where->ref.get() == &placeholder);
+      if (unlikely(where == read_set.end())) {
+       SUBERRORT(seastore_t,
+         "unable to find placeholder {}", *this, placeholder);
+       ceph_abort();
+      }
+      if (unlikely(where->ref.get() != &placeholder)) {
+       SUBERRORT(seastore_t,
+         "inconsistent placeholder, current: {}; should-be: {}",
+         *this, *where->ref.get(), placeholder);
+       ceph_abort();
+      }
       placeholder.read_transactions.erase(
        read_trans_set_t<Transaction>::s_iterator_to(*where));
       where = read_set.erase(where);