Found while moving the type layer to chtypes 1.0 in draft PR #712 (branch chtypes-v2).
Problem. A process has one chtypes image zone. It is fixed for the life of the process, and it decides how zone-less DateTime columns and the functions over them are computed. WaveHouse takes it from the first tenant that is actually served: the tenant's zone name is recognised, an artifact is installed for its ClickHouse line, and its first open succeeds. When tenants' servers run in different time zones, which tenant that is depends on which tenant's discovery finishes first. That is a race between discovery loops, so it can change from one restart to the next.
Effect.
Evidence.
- Inferred from
internal/typelayer/zone.go (openLine/openFirst) and internal/app discovery wiring on the PR branch.
- The image-zone subprocess tests in
internal/typelayer/zone_test.go pin the first-served rule. They cover a Tokyo tenant first, a missing artifact first, an unrecognised zone first, a failed first open, and concurrent first binds. The concurrent case shows exactly one commit, but not which tenant wins.
- Not reproduced end to end against two ClickHouse servers in different zones.
Who meets it. Only processes whose tenants' servers report different time zones. A deployment whose tenants share one zone always gets that zone.
Related: #717 (zone-name spelling).
Found while moving the type layer to chtypes 1.0 in draft PR #712 (branch
chtypes-v2).Problem. A process has one chtypes image zone. It is fixed for the life of the process, and it decides how zone-less
DateTimecolumns and the functions over them are computed. WaveHouse takes it from the first tenant that is actually served: the tenant's zone name is recognised, an artifact is installed for its ClickHouse line, and its first open succeeds. When tenants' servers run in different time zones, which tenant that is depends on which tenant's discovery finishes first. That is a race between discovery loops, so it can change from one restart to the next.Effect.
DateTime/DateTime64column plus anyDEFAULT/MATERIALIZED/ALIAS/EPHEMERALexpression is unavailable for that tenant. Column functions run in the image zone (upstream: Per-schema server profile: the server's zone and input-affecting settings, honoured by functions, DEFAULTs, literals and parsing (1.0.x, high priority) chtypes#419).Evidence.
internal/typelayer/zone.go(openLine/openFirst) andinternal/appdiscovery wiring on the PR branch.internal/typelayer/zone_test.gopin the first-served rule. They cover a Tokyo tenant first, a missing artifact first, an unrecognised zone first, a failed first open, and concurrent first binds. The concurrent case shows exactly one commit, but not which tenant wins.Who meets it. Only processes whose tenants' servers report different time zones. A deployment whose tenants share one zone always gets that zone.
Related: #717 (zone-name spelling).