Fix read fio bench

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