diff --git a/src/fxhnt/adapters/warehouse/timescale_feature_store.py b/src/fxhnt/adapters/warehouse/timescale_feature_store.py index 747c39f..43f7a70 100644 --- a/src/fxhnt/adapters/warehouse/timescale_feature_store.py +++ b/src/fxhnt/adapters/warehouse/timescale_feature_store.py @@ -92,9 +92,11 @@ class TimescaleFeatureStore: # Hypertable + compression: best-effort perf layer, guarded so it no-ops without timescaledb. if self._is_pg: self._try_make_hypertable() - # Live-mark matview: idempotently create it at setup so the cockpit's read_latest fast path is live as - # soon as the bybit_features store exists (no separate migration step). No-op off-PG/off-bybit. - self.ensure_latest_matview() + # NB: the live-mark matview is NOT created here — CREATE MATERIALIZED VIEW over the ~4M-row hypertable + # is far too heavy for the store-init path, which runs on EVERY cockpit pod startup (it blocked uvicorn + # from binding → readiness/liveness failed → crashloop). The matview is created + refreshed ONLY by the + # nightly ingest (refresh_latest → ensure_latest_matview); read_latest falls back to the LATERAL until + # then, so the cockpit boots instantly and is never wrong. # -- live-mark matview (PG + bybit_features only; perf layer, never affects correctness) --------- def ensure_latest_matview(self) -> None: