Feature Store V2 Backfill Runbook
Purpose
The v2 feature store uses ClickHouse historical tables as the source of truth for offline retrieval and Redis as the latest online serving copy. Backfills must create point-in-time correct historical rows and publish the validated latest rows online.
Scope
Backfill the most recent 730 days, or all available source history when less than 730 days exists. Keep the retention window aligned with ClickHouse table TTLs and model-training lookback windows.
Preconditions
- ClickHouse migration
020_create_feature_store_v2.sqlhas succeeded. - Feast registry definitions from
/app/feature_repohave been applied. FEAST_REGISTRY_PATHandFEAST_REGISTRY_READ_PATHare configured.- Redis and ClickHouse are reachable from bootstrap jobs.
- Source events have completed ingestion for the target backfill window.
Engineering Backfill
Run the engineering bootstrap workflow with:
recompute_features=truecleanup_existing_data=falseunless intentionally rebuilding the environmentrun_training=falsefor a feature-only validation passregister_model=falseupdate_engineering_run_id=false
The workflow runs member, item, and cohort feature jobs with --mode full --publish-online, then runs the v2 validation job. For a replayable backfill, patch the job command to include an explicit UTC --as-of and matching --source-watermark.
Production Backfill
For production, run feature refresh jobs independently of serving rollout until validation passes:
kubectl apply -n hh-lion -f k8s/shared/bootstrap-feast-repo-job.yaml
kubectl apply -n hh-lion -f k8s/shared/bootstrap-member-features-job.yaml
kubectl apply -n hh-lion -f k8s/shared/bootstrap-item-features-job.yaml
kubectl apply -n hh-lion -f k8s/shared/bootstrap-cohort-features-job.yaml
kubectl apply -n hh-lion -f k8s/shared/feature-store-v2-validation-job.yaml
Patch each job image to the exact release image before applying it. Do not reuse a stale latest tag for production backfills.
Validation Gates
Backfill is not complete until all gates pass:
- Historical feature validation:
scripts.validate_feature_store_v2 --lookback-days 3. - Online publication audit: attempted rows equal published rows and failed rows are zero.
- Serving readiness:
feature_store_registry,feature_store_online_store, andfeature_store_freshnessare ready. - Performance benchmark: p95/p99 latency and throughput do not regress beyond the committed baseline.
- Capacity plan: Redis memory and ClickHouse partitions have approved headroom.
- Recommendation quality: candidate metrics do not regress and result-validity exposure rates are zero.
Rollout
Only after backfill validation passes:
- Confirm the recommendation-quality artifact is present at
artifacts/recommendation_quality/time/latest_vs_production.json. - Run the deploy workflow.
- Confirm the deploy workflow executes the v2 feature-store, performance, capacity, and recommendation-quality gates before applying serving manifests.
- Watch readiness and feature-store metrics for the full rollout window.
Rollback
If validation fails before serving rollout, fix the failed feature set before deploying. If serving has already rolled out and readiness fails, roll back the deployment image or disable traffic through the approved release process. Do not change validation thresholds during rollback.