Handle dirty deletes during read correctly O_o

This commit is contained in:
Vitaliy Filippov
2023-05-20 23:19:39 +03:00
parent 105a405b0a
commit a9581f0739
+6 -2
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;