concurrent_append_SUITE: twenty writers held to the concurrency contract; the race waits on progress (#7) #8
Loading…
Reference in a new issue
No description provided.
Delete branch "neptunus/7-concurrent-append-timeout"
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?
Refs #7.
The 20-writer case timed out on the forge in 4 of 5 full-gate runs. Supervisor's ruling (2026-12-02, relayed by Mars): option (2), the 20-writer case asserts the real optimistic-concurrency contract on slow storage.
Cause. The forge runner is about 25 times slower than a laptop (20 writers x 100 appends took 42223 ms there, against 1.7 s locally). At that speed a few appends lose all 60 retry attempts and are refused as
version_conflict(2 of 2000). The old fixed 30 s wait hid that refusal behind a timeout. No writer stalled. Tuning the retry pause does not fix it (see #7): that idea was tried and dropped. Per-stream serialization is filed as #9, not built.Changes (test plus one header comment):
twenty_writers_on_one_stream_keep_every_eventbecomestwenty_writers_on_one_stream_store_exactly_what_was_acknowledged:{ok, _}or{error, {version_conflict, -2, _}};ten_writers_on_one_stream_keep_every_eventstill requires every append to land. It passed in every forge run, so no backoff change is needed for it.reckon_db.hrl: the 20-writer figures are fast storage, and slow storage reaches the cap (#7, #9).Proof.
--cpus 0.1): the contract case passes, with 1964 of 2000 acknowledged and 36 refused, all accounted for.concurrent_append_SUITE: the writer race waits on progress and names a stall (#7)to concurrent_append_SUITE: twenty writers held to the concurrency contract; the race waits on progress (#7)The ten- and twenty-writer cases reach the retry cap only on slow storage, so at normal speed nothing checked what a capped append answers or writes. A TEST-only export of try_append/6 lets the suite drive the last attempt with a version one behind the stream: it must answer {error, {version_conflict, ANY_VERSION, Read}} and leave the stream as it was.