Fix a bug with unstable_big over unstable_small

This commit is contained in:
Vitaliy Filippov
2025-11-23 19:08:24 +03:00
parent dc31650110
commit 4bc1d09fbd
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -1572,6 +1572,7 @@ int blockstore_heap_t::post_stabilize(object_id oid, uint64_t version, uint32_t
wr->type() == BS_HEAP_TOMBSTONE)) wr->type() == BS_HEAP_TOMBSTONE))
{ {
unstable_big_wr = wr; unstable_big_wr = wr;
break;
} }
} }
} }
@@ -1613,6 +1614,7 @@ int blockstore_heap_t::post_stabilize(object_id oid, uint64_t version, uint32_t
push_inflight_lsn(oid, wr->lsn, wr->needs_compact(this) ? HEAP_INFLIGHT_COMPACTABLE : 0); push_inflight_lsn(oid, wr->lsn, wr->needs_compact(this) ? HEAP_INFLIGHT_COMPACTABLE : 0);
} }
} }
assert(last_lsn == next_lsn-stab_count);
obj->crc32c = obj->calc_crc32c(); obj->crc32c = obj->calc_crc32c();
return 0; return 0;
} }
+1
View File
@@ -33,6 +33,7 @@ int blockstore_impl_t::dequeue_stable(blockstore_op_t *op)
} }
if (new_lsn) if (new_lsn)
{ {
assert(priv->lsn == 0 || priv->to_lsn == new_lsn-1);
if (!priv->lsn) if (!priv->lsn)
priv->lsn = new_lsn; priv->lsn = new_lsn;
priv->to_lsn = op->opcode == BS_OP_STABLE ? new_to_lsn : new_lsn; priv->to_lsn = op->opcode == BS_OP_STABLE ? new_to_lsn : new_lsn;