Condition bounded work admission on an exact retained publication #16

Closed
opened 2026-12-02 20:35:25 +00:00 by faumaray · 1 comment
Owner

A consumer reads and validates an immutable publication, then submits work derived from it. Another thread can publish a replacement between validation and queue admission, even when the epoch is unchanged. We reproduced this between a network adapter and an authoritative owner on Windows x64 under Wine. A command admitted after replacement changed the new owner state. Work admitted before replacement is expected to settle normally. Downstream owner and protocol adapter

At 7b0fea6095f603f9e1904f66dfdc7752f4be4792, FuturePool::try_submit reserves capacity and preserves the callable on refusal. The public queue and configuration snapshot interfaces provide separate submission and publication operations. Could the library support an opt-in bounded submission conditioned on an exact retained publication, with the comparison and transfer sharing one atomic ordering point? Distinct outcomes for a changed publication, saturation and closure let the caller retry or discard correctly. FuturePool contract · Messaging queue · Immutable publication proposal #5 · Result ledger proposal #6

A replacement test can hold a producer after validating publication A, publish B in the same epoch, then release the producer. The stale submission should retain its payload and leave the queue unchanged. In the converse ordering, admitted work should finish exactly once. A fresh producer should be able to submit against B, including after capacity becomes available. The caller supplies its own validation rules and payload.

A consumer reads and validates an immutable publication, then submits work derived from it. Another thread can publish a replacement between validation and queue admission, even when the epoch is unchanged. We reproduced this between a network adapter and an authoritative owner on Windows x64 under Wine. A command admitted after replacement changed the new owner state. Work admitted before replacement is expected to settle normally. [Downstream owner and protocol adapter](https://git.faumaray.com/Lagg1ng/stoneheart_at_home/pulls/9) At `7b0fea6095f603f9e1904f66dfdc7752f4be4792`, `FuturePool::try_submit` reserves capacity and preserves the callable on refusal. The public queue and configuration snapshot interfaces provide separate submission and publication operations. Could the library support an opt-in bounded submission conditioned on an exact retained publication, with the comparison and transfer sharing one atomic ordering point? Distinct outcomes for a changed publication, saturation and closure let the caller retry or discard correctly. [FuturePool contract](https://git.faumaray.com/Void/Library/src/commit/7b0fea6095f603f9e1904f66dfdc7752f4be4792/include/Void/Async/FuturePool.hpp) · [Messaging queue](https://git.faumaray.com/Void/Library/src/commit/7b0fea6095f603f9e1904f66dfdc7752f4be4792/include/Void/Messaging/Queue.hpp) · [Immutable publication proposal #5](https://git.faumaray.com/Void/Library/issues/5) · [Result ledger proposal #6](https://git.faumaray.com/Void/Library/issues/6) A replacement test can hold a producer after validating publication A, publish B in the same epoch, then release the producer. The stale submission should retain its payload and leave the queue unchanged. In the converse ordering, admitted work should finish exactly once. A fresh producer should be able to submit against B, including after capacity becomes available. The caller supplies its own validation rules and payload.
Author
Owner

Implemented on branch issue/16-publication-gated-queue (local commit 603e54f).

Void::Async::PublicationGatedQueue added: admission compares an exact retained publication token and reserves capacity under one lock, with distinct publication_changed/saturated/closed outcomes and an untouched payload on refusal.

Merge request: #32

Implemented on branch `issue/16-publication-gated-queue` (local commit `603e54f`). `Void::Async::PublicationGatedQueue` added: admission compares an exact retained publication token and reserves capacity under one lock, with distinct publication_changed/saturated/closed outcomes and an untouched payload on refusal. Merge request: https://git.faumaray.com/Void/Library/pulls/32
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#16