Skip to content

Make cache warm-up at startup controllable (always | if-empty | never) #201

Description

@jrosskopf

Problem

CacheManager::warmUpCaches re-runs every cache populate query at every start (src/main.cpp, src/cache_manager.cpp). On scale-to-zero platforms (Cloud Run) every new instance, restart and CI smoke test re-loads the whole source (observed: 5–40 GB from BigQuery, 6–17 min cold starts, exceeding Cloud Run's 240 s startup probe). There is no way to start the real server without touching data.

Proposal

  • ducklake.warmup: always | if-empty | never (default always, unchanged), per-endpoint cache.warmup, overrides --cache-warmup <mode>, --no-cache-warmup, FLAPI_CACHE_WARMUP.
  • if-empty skips caches whose table already exists in the catalog.
  • A skipped cache whose table does not exist is unbuilt: endpoint answers 503 cache_not_built; /health answers 200 with status: degraded and an unbuilt list (decision: same semantics as stale, so probes and CI pass while monitoring alerts).

Context: review of the "Hybrid 3-Tier Cloud Run Caching" proposal (gap G1).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions