File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -294,6 +294,7 @@ class Transaction {
294294 }
295295
296296 void replace_placeholder (CachedExtent& placeholder, CachedExtent& extent) {
297+ LOG_PREFIX (Transaction::replace_placeholder);
297298 ceph_assert (!is_weak ());
298299
299300 assert (is_retired_placeholder_type (placeholder.get_type ()));
@@ -303,8 +304,17 @@ class Transaction {
303304 assert (extent.get_paddr ().is_absolute ());
304305 {
305306 auto where = read_set.find (placeholder.get_paddr (), extent_cmp_t {});
306- assert (where != read_set.end ());
307- assert (where->ref .get () == &placeholder);
307+ if (unlikely (where == read_set.end ())) {
308+ SUBERRORT (seastore_t ,
309+ " unable to find placeholder {}" , *this , placeholder);
310+ ceph_abort ();
311+ }
312+ if (unlikely (where->ref .get () != &placeholder)) {
313+ SUBERRORT (seastore_t ,
314+ " inconsistent placeholder, current: {}; should-be: {}" ,
315+ *this , *where->ref .get (), placeholder);
316+ ceph_abort ();
317+ }
308318 placeholder.read_transactions .erase (
309319 read_trans_set_t <Transaction>::s_iterator_to (*where));
310320 where = read_set.erase (where);
You can’t perform that action at this time.
0 commit comments