Do not block reads by previous unfinished writes

This commit is contained in:
Vitaliy Filippov
2020-03-13 21:28:49 +03:00
parent eba053febe
commit 6982fe1255
5 changed files with 6 additions and 21 deletions
+3 -5
View File
@@ -8,12 +8,10 @@ int blockstore_impl_t::fulfill_read_push(blockstore_op_t *op, void *buf, uint64_
// Zero-length version - skip
return 1;
}
if (IS_IN_FLIGHT(item_state))
else if (IS_IN_FLIGHT(item_state))
{
// Pause until it's written somewhere
PRIV(op)->wait_for = WAIT_IN_FLIGHT;
PRIV(op)->wait_detail = item_version;
return 0;
// Write not finished yet - skip
return 1;
}
else if (IS_DELETE(item_state))
{