Expand description
Shared Arc<ViewFactory> rebuilt from Postgres-backed view definitions on a timer, giving
telemetry-maintenance-srv and flight-sql-srv a common, reloadable view of DDL-defined view
sets without a restart.
ViewRegistry: a shared Arc<ViewFactory> (the code-driven base plus every DDL-defined global
view) rebuilt from lakehouse_view_set_definitions on a timer, so telemetry-maintenance-srv
and flight-sql-srv both start reading/materializing a new or changed view set without a
restart. Shaped after QueryDenyList: a Postgres-backed store, an immutable compiled snapshot
behind a lock, a refresh/reload that logs and meters its own failures, and
spawn_refresh_task.
Structs§
- Build
Failure - A definition
build_factoryskipped, with the reason it was skipped, so a [BuildPurpose:: Probe] caller can name both in the error it raises. - View
Registry - A shared
Arc<ViewFactory>(base + N DDL-definedSqlBatchViews) rebuilt fromlakehouse_view_set_definitionson a timer. See the module doc comment.
Enums§
- Build
Purpose - What a
build_factorycall is for, which decides how a skipped definition is reported.
Constants§
- DEFAULT_
REFRESH_ SECONDS - Default value of
MICROMEGAS_VIEW_DEFINITION_REFRESH_SECONDS. - MICROMEGAS_
VIEW_ DEFINITION_ REFRESH_ SECONDS {prefix}-less env var: how oftenspawn_refresh_taskcallsreload(), and the bound on cross-replica propagation of a definition change made on a different node (the node that executed the DDL statement reloads inline instead, seerust/public/src/servers/view_ddl.rs).
Functions§
- build_
factory - Builds a factory from an explicit row set instead of
store.list(), so a caller already holding rows inside an open transaction (the DDL executor’s dependent-protection check) can validate against them without a second, pool-backed read that would not see its own uncommitted write.reload()calls this too, after its ownstore.list().asyncbecause building each row’sSqlBatchViewis itselfasyncand needsruntime/lake/session_configuratorto plan the extract query.