Fix read fio bench

This commit is contained in:
Vitaliy Filippov
2025-11-23 19:08:24 +03:00
parent 1a4c6746c4
commit 3bb514321f
+4 -2
View File
@@ -19,14 +19,16 @@ int blockstore_impl_t::dequeue_read(blockstore_op_t *op)
PRIV(op)->pending_ops = 0; PRIV(op)->pending_ops = 0;
auto & rv = PRIV(op)->read_vec; auto & rv = PRIV(op)->read_vec;
uint64_t result_version = 0; uint64_t result_version = 0;
bool found = false;
for (auto wr = obj->get_writes(); wr; wr = wr->next()) for (auto wr = obj->get_writes(); wr; wr = wr->next())
{ {
if (op->version < wr->version) if (op->version < wr->version)
{ {
continue; continue;
} }
if (!result_version) if (!found)
{ {
found = true;
result_version = wr->version; result_version = wr->version;
if (op->bitmap) if (op->bitmap)
{ {
@@ -41,7 +43,7 @@ int blockstore_impl_t::dequeue_read(blockstore_op_t *op)
break; break;
} }
} }
if (!result_version) if (!found)
{ {
// May happen if there are entries but all of them are > requested version // May happen if there are entries but all of them are > requested version
heap->unlock_entry(op->oid, PRIV(op)->lsn); heap->unlock_entry(op->oid, PRIV(op)->lsn);