Skip to content

catalog: document the source and sink statuses the code produces - #38585

Open
ggevay wants to merge 1 commit into
MaterializeInc:mainfrom
ggevay:gabor/source-status-docs
Open

catalog: document the source and sink statuses the code produces#38585
ggevay wants to merge 1 commit into
MaterializeInc:mainfrom
ggevay:gabor/source-status-docs

Conversation

@ggevay

@ggevay ggevay commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Motivation

The status column comments of mz_source_statuses, mz_sink_statuses, mz_source_status_history and mz_sink_status_history, and the docs rows generated from them, list failed, which nothing produces, and leave out paused for sinks, which the controller does produce. Found while writing agent guidance that keys off these statuses.

Description

  • failed removed from all four comments and docs rows: the storage Status enum (src/storage-client/src/client.rs:168) has starting, running, paused, stalled, ceased (unused) and dropped, its FromStr rejects any other string, and no writer emits failed.
  • paused added to the two sink relations: update_paused_statuses (src/storage-controller/src/instance.rs:306) and the replica-dropped path (src/storage-controller/src/lib.rs:640) write paused for sinks as well as sources.
  • created stays: the status views synthesize it for objects with no status row yet (COALESCE(status, 'created')).
  • sink-troubleshooting.md also told users to look for failed. It now names only stalled.
  • test/sqllogictest/autogenerated/mz_internal.slt regenerated with ci/test/lint-docs-catalog.sh --rewrite.

Verification

ci/test/lint-docs-catalog.sh passes; the regenerated SLT asserts the docs text against the live column comments in CI.

The column comments and the docs listed `failed` among the statuses of
mz_source_statuses, mz_sink_statuses and their history relations, and
omitted `paused` for sinks. The storage status enum has no `failed`
variant and its parser rejects the string, no writer produces it, and
the controller sets `paused` on sinks as well as sources when their
cluster has no replica. `created` stays: the status views synthesize it
for an object with no status recorded yet. The sink troubleshooting page
named `failed` as well.

The autogenerated catalog docs SLT is regenerated with
ci/test/lint-docs-catalog.sh --rewrite.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ggevay
ggevay force-pushed the gabor/source-status-docs branch from 52593c3 to 74ff4d3 Compare August 31, 2026 14:55
@ggevay
ggevay marked this pull request as ready for review August 31, 2026 18:18
@ggevay
ggevay requested review from a team as code owners August 31, 2026 18:18
@ggevay
ggevay requested review from a team and removed request for a team August 31, 2026 18:18
@ggevay ggevay added the T-sources Theme: Sources label Aug 31, 2026
| `occurred_at` | [`timestamp with time zone`] | Wall-clock timestamp of the sink status change. |
| `sink_id` | [`text`] | The ID of the sink. Corresponds to [`mz_catalog.mz_sinks.id`](../mz_catalog#mz_sinks). |
| `status` | [`text`] | The status of the sink: one of `created`, `starting`, `running`, `stalled`, `failed`, or `dropped`. |
| `status` | [`text`] | The status of the sink: one of `created`, `starting`, `running`, `paused`, `stalled`, or `dropped`. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't think created was valid in mz_sink_status_history, it shows up in mz_sink_statuses due to coalesce(status, 'created') as status so it wouldn't be NULL when joining against mz_sinks.

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

Labels

T-sources Theme: Sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants