Store v1: Don't let the ack of an older big write unblock later small writes #149

Merged
vitalif merged 1 commits from koolkhel/vitastor:blockstore-v1-wait-big-ack into master 2026-11-22 23:06:51 +03:00

1 Commits

Author SHA1 Message Date
1c8e8be29f Store v1: Don't let the ack of an older big write unblock later small writes
With immediate_commit=all a small write following an in-flight big write waits
in WAIT_BIG until that big write is acked, because its journal entry depends on
the entry of the big write. The ack of a big write unblocked every later
WAIT_BIG write of the object, including the ones waiting for a newer big write
which was still in flight. Their journal entries could then reach the disk
before the newer big write's entry, and after a crash or restart the replay put
them on top of the older big write, giving a version that was never written.

Stop at the next big write: the small writes after it are unblocked by its own
ack. The same was fixed for syncs in ack_sync().
2026-11-22 19:17:51 +03:00