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
Adds the collector that fills `mz_internal.mz_object_hydration_history`, and the
background read-then-write plumbing it needs.
A sweep visits one managed user replica per interval and installs an internal
subscribe on that replica which aggregates complete per-worker episodes, maps
runtime export ids to catalog objects, anti-joins against the history table, and
writes the missing rows through the timestamped OCC path. Retention retracts a
bounded batch per sweep on the catalog server, independently of whether that
sweep's collection succeeded.
Reading the target table inside the subscribe is what makes the write idempotent
across concurrent environmentd processes. Two collectors that compute the same
row race for one write timestamp, and the loser observes the winner's append
through its own subscribe and finds nothing left to write.
The read-then-write path grows an `RtwCaller`, because replica pinning,
dependency validation, and write cancellation all differ for a background caller
and have to move together. Background subscribes are owned by the coordinator
rather than a session, so they write no `mz_subscriptions` row, and background
writes take no OCC permit: the sweep has no statement timeout, and its subscribe
must first hydrate a dataflow on a user replica, so holding a permit would let it
stall user DML for as long as that takes.
Collection is off by default and enabled in the mzcompose configuration.
`test/testdrive/hydration-status.td` covers lifecycle ordering, several replicas,
deduplication across sweeps, replica removal, retention, and the deliberate
absence of an object that never reports a completion time.
`test/restart/mzcompose.py` covers survival of an environmentd restart without
duplication, on a two-worker replica.
Closes: SQL-644
0 commit comments