Store v1: Fix writes over a deletion hanging with immediate_commit=all #165

Merged
vitalif merged 1 commits from koolkhel/vitastor:blockstore-v1-wait-big-after-delete into master 2026-11-24 03:49:04 +03:00
Contributor

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 e9570efe that 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

### 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 e9570efe that 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 - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
koolkhel added 1 commit 2026-11-23 16:47:31 +03:00
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 e9570efe that 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.
vitalif merged commit c2117bc930 into master 2026-11-24 03:49:04 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#165
No description provided.