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
gateway: decide whether the allowance survives a restart, and persist it if so #2618
Today. The allowance (--allowance-bytes-per-day, --allowance <ns>=<bytes>) is metered in memory. A restart forgives whatever was spent that UTC day, by design: the pool balance is the hard stop (crates/cli/src/commands/gateway/allowance.rs module doc, adr/appendix-gateway.md § Payment and allowance).
Ask. Decide whether a restart should forgive the day. If not, persist the per-bucket (day, bytes) under <data-dir>/store (or a small file next to pointers/) on each charge batch and reload at start. The per-namespace buckets make this matter more than it did: an operator who gives a partner 20 GiB/day and restarts for a release has reset that partner's day, and a namespace that is refused could ask for a restart. Keep writes rare (every N MiB or every few seconds), and keep the shape out of the ADRs unless it becomes part of what a publisher can rely on.
Why. Operators will reason about the allowance as a daily cap; a cap that resets on deploys is a surprise once there are several namespaces with their own.
Activity
yigitdot commentedon Nov 17, 2026
Obsolete: #2910 removed the gateway allowance, so there is nothing left to persist across restarts.