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
doc: correct the hydration timestamps design against what shipped (#38384)
### Motivation
The design doc merged in #38238 no longer describes `main` in two
places. Both surfaced while reviewing #38344, which builds on this
change and describes it, so the two docs currently disagree with each
other and one of them disagrees with the code.
Ref: [SQL-632](https://linear.app/materializeinc/issue/SQL-632)
Doc only.
### Description
**The per-worker log was not renamed.** The doc specifies renaming it to
`mz_compute_hydration_timestamps_per_worker` with the old name left
behind as a projecting view. What shipped appends the columns to
`mz_compute_hydration_times_per_worker` in place, keeping its name, OID
and object kind, so there is no view and `SELECT *` against it returns a
wider row.
The shipped behaviour is the better trade and the doc now argues for it
rather than against it. The rename bought only the `SELECT *` width on
an unstable `mz_introspection` relation, and cost a new OID, a view, and
the golden churn from both. Every consumer of that relation selects
columns by name: the introspection subscribe, `mz-debug`, and the
goldens, which churn either way. The one consumer that decodes
positionally, `arrangement_sizes_snapshot`, reads the aggregate
`mz_internal.mz_compute_hydration_times`, which neither approach would
have touched. Success criterion 7 is narrowed accordingly, since the log
did change shape and the original wording promised it would not.
**The `started_at` backfill is a normal path, not a repair.** The doc
claims the creation-time and `handle_schedule` stamps cover every way a
dataflow can begin computing without a `Schedule`, so a remaining NULL
at hydration is unanticipated and worth a diagnostic. That reasoning is
wrong, and the implementation comment says why: having no imports is
sufficient to start immediately, but it is not necessary in order to
hydrate early. A dataflow that *does* import can still see its output
frontier pass the as-of while suspended, when the arrangement it imports
is already hydrated, and a handful of `mz_catalog_server` indexes do
exactly that on every bootstrap.
So the backfill needs no diagnostic, and the doc now explains what it is
for instead of treating it as a guard. It also records the consequence
for consumers: a backfilled `started_at` equals `installed_at` exactly,
where a creation-time one is a separate event a few microseconds later,
and that difference is an artifact of stamping rather than a contract
anyone should read a zero queueing interval through.
### Verification
Documentation only. No behaviour described here changes, and no code is
touched: the corrections bring the document in line with what already
shipped.
---
_Generated by [Claude
Code](https://claude.ai/code/session_018ZVCMBSLdxzGus78ZKWhZz)_
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments