Handle dirty deletes during read correctly O_o

test-double-alloc
Vitaliy Filippov 2023-04-21 00:50:25 +03:00
parent 105a405b0a
commit a9581f0739
1 changed files with 6 additions and 2 deletions

View File

@ -142,12 +142,16 @@ int blockstore_impl_t::dequeue_read(blockstore_op_t *read_op)
bool version_ok = !IS_IN_FLIGHT(dirty.state) && read_op->version >= dirty_it->first.version;
if (IS_SYNCED(dirty.state))
{
if (!version_ok && read_op->version != 0)
read_op->version = dirty_it->first.version;
version_ok = true;
}
if (version_ok)
{
if (IS_DELETE(dirty.state))
{
assert(!result_version);
clean_found = false;
break;
}
if (!result_version)
{
result_version = dirty_it->first.version;