Skip to content

feat(orchestrator): Freeze queue processing while FreezeProcessing is set - #865

Merged
manjari25 merged 5 commits into
mainfrom
manjari/queue-pause-4-freeze-gate
Oct 15, 2026
Merged

manjari25 merged 5 commits into
mainfrom
manjari/queue-pause-4-freeze-gate

Conversation

@manjari25

Copy link
Copy Markdown
Contributor

Why?

A paused queue needs to stop advancing accepted requests without a redeploy. The consumer gate already lets a controller be stopped and started at runtime, so freezing a queue is a gate that reads the queue's pause state.

What?

  • A gate that wraps the orchestrator's existing consumer gate. While FreezeProcessing is set for a delivery's queue (its tenant), the gate is closed for every stage, including the dead-letter consumers. Blocked deliveries are postponed without spending retry budget, and released within a re-check delay of the flag being cleared. Otherwise the wrapped gate decides, so CONSUMER_GATE_DIR keeps working.
  • A failed pause read also closes the gate.
  • The orchestrator reads QUEUE_PAUSE_CONFIG_PATH. The store selection moves into a shared queuepausestore package that the gateway now uses too.

Test Plan

bazel test //service/submitqueue/queuepausestore/... //service/submitqueue/orchestrator/server
CI
End to End tests in next PR

Issue

@manjari25
manjari25 marked this pull request as ready for review October 14, 2026 18:44
@manjari25
manjari25 requested review from a team, behinddwalls and sbalabanov as code owners October 14, 2026 18:44
@manjari25
manjari25 force-pushed the manjari/queue-pause-4-freeze-gate branch from 884f569 to 353fc77 Compare October 14, 2026 19:17
@behinddwalls
behinddwalls added this pull request to stack #868 October 14, 2026 19:49
Comment thread service/submitqueue/queuepausestore/queuepausestore.go Outdated
@behinddwalls
behinddwalls added this pull request to the merge queue Oct 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Oct 15, 2026
@manjari25
manjari25 added this pull request to the merge queue Oct 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 15, 2026
Base automatically changed from manjari/queue-pause-3-gateway-reject to main October 15, 2026 22:15
@manjari25
manjari25 force-pushed the manjari/queue-pause-4-freeze-gate branch from 1e5a396 to 2459caa Compare October 15, 2026 22:15
@manjari25
manjari25 added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit e9228ed Oct 15, 2026
18 checks passed
@manjari25
manjari25 deleted the manjari/queue-pause-4-freeze-gate branch October 15, 2026 22:57
Tmwakalasya pushed a commit to Tmwakalasya/submitqueue that referenced this pull request Oct 15, 2026
## Why?
The pause RFC still presented two options as an open comparison, but the
stack in uber#862 to uber#865 and the e2e tests implement one of them. An RFC
describes what is on main, so it now records the design that shipped and
only the alternative it rejected.

## What?
- Rewrites the pause RFC around the shipped design: a separate
`queuepause` extension, reject (`FailedPrecondition`, carrying the
operator's reason) and freeze, both failing closed on a read error. A
cancelled context is passed through.
- Documents the `noop`, `file` and `fake` stores,
`QUEUE_PAUSE_CONFIG_PATH`, and the shared wiring helper.
- Adds the requirements an implementation of `queuepause.Store` must
meet, such as failing closed on read errors, strict parsing, and failing
at construction on bad configuration.
- States that the gateway's own request-log consumer is not frozen, so
status and history keep materializing during a freeze.
- Keeps the queue-config option only as a short rejected alternative,
and drops the resolved fail-open question.
- Corrects the consumer gate RFC: orchestrator stages share one consumer
group, and production pause is a separate mechanism that wraps the gate.
Updates the RFC index entry.

## Test Plan
Docs only, no runnable change. `make lint` passes.

## Issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants