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
Rate-limit rollups need durable queue-scoped storage without exposing runtime
state through River's public metadata APIs or allowing ordinary queue updates
to erase it.
Reserve top-level `river:*` metadata keys, preserve them atomically across user
metadata replacement, and filter them from public reads, notifications, and
producer polling. Wrap non-object user metadata only when runtime keys must
coexist with it so the public representation remains unchanged.
Retain queues while a rollup has unexpired debt, lock cleanup candidates before
deletion, and use one database-relative timestamp for each cleanup pass. Pass
River's existing producer stale horizon through the pilot boundary so Pro can
apply the same liveness definition to concurrency and retained rate debt.
Expose shared transaction advisory locks through the driver seam so unlimited
fetches can inspect configuration concurrently while producer lifecycle changes
and limited fetches coordinate through the exclusive counterpart.
`UPDATE `+dbutil.SafeIdentifier(bundle.schema)+`.river_queue SET metadata = metadata || '{"river:rate_limit_rollup":{"version":1}}' WHERE name = $1 RETURNING 1`,
`UPDATE `+dbutil.SafeIdentifier(bundle.schema)+`.river_queue SET metadata = metadata || '{"river:rate_limit_rollup":{"version":1}}' WHERE name = $1 RETURNING 1`,
`SELECT metadata -> 'river:rate_limit_rollup', metadata -> 'river:attempted_override' IS NULL FROM `+dbutil.SafeIdentifier(bundle.schema)+`.river_queue WHERE name = $1`,
0 commit comments