You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Custom queue-storage schema: reject runtime slot counts that differ from the installed ring #689
A runtime on a custom queue-storage schema can be configured with different ring slot counts from the ones the schema was installed with, and nothing rejects it.
How it happens.install_queue_storage_substrate seeds {queue,lease,claim}_ring_state.slot_count with ON CONFLICT (singleton) DO NOTHING, so preparing an existing schema with different counts keeps the installed counts without error. Rotation then follows the installed slot_count, while several runtime paths bound slots by the configured count:
complete_receipt_runtime_batch_fast maps the claim slot through ring_slot_index(.., claim_slot_count(), ..), so a claim in a slot at or above the configured count fails completion with invalid claim ring slot N.
Both receipt-rescue loops iterate 0..claim_slot_count(), so claims in higher slots are never rescued.
oldest_initialized_claim_slot_tx filters slots to < claim_slot_count().
With fewer configured than installed slots, jobs claimed into the higher slots can fail to complete or stay stranded after a worker dies. The default awa schema is not affected: both the installer and QueueStorage::new force default slot counts there.
Proposed fix. At startup (or in prepare_schema), read the three *_ring_state.slot_count values and refuse to run when the configured counts differ, naming both values. Admin reads already use installed slot numbers (#665, #688).
Activity