Store v1: Fix writes over a deletion hanging with immediate_commit=all #165
Reference in New Issue
Block a user
No description provided.
Delete Branch "koolkhel/vitastor:blockstore-v1-wait-big-after-delete"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
A follow-up to #149, which broke this.
Writes over a deletion wait until it is flushed. erase_dirty() then puts the first of them in flight and every later one, big writes included, into WAIT_BIG. With immediate_commit=all only the ack of the previous big write lets them go, and since
e9570efethat loop stops before the next big write, so a second big write queued over a deletion and everything after it hung forever.Unblock the next big write too and stop after it, as ack_sync() does.
The new test also checks that the writes held back are released later, which the test of #149 did not.
Tested: test_blockstore_v1, including the new test_writes_over_delete_released_imm, which fails without the fix: the deletion and the first write complete, the second big write and the small write after it never do. test_blockstore_chaos --seeds 1-300 on configurations 12-23, and --seeds 1-100 --steps 30000 --p-delete 30 on configurations 12 and 18: all pass.
Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA