bug: FeatureStore.materialize() OOM-crashes on large time ranges with no built-in workaround
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- cli, data-engineering
Research direction
Start with the FeatureStore.materialize() and materialize_incremental() entry points, then review linked PR #6277. Check how feature_store.yaml and the CLI expose materialization options, and verify that chunking is opt-in, works through both interfaces, and preserves progress after an interrupted run.
Written by the indexing model from the issue text.
Description
Summary
FeatureStore.materialize() and FeatureStore.materialize_incremental() load the entire requested time range into memory in a single pass. On production deployments this causes out-of-memory (OOM) crashes that are silent, difficult to recover from, and currently require external orchestration to work around.
Steps to reproduce
from datetime import datetime, timedelta
fs.materialize(
start_date=datetime(2026, 1, 1),
end_date=datetime(2026, 3, 1), # ~60-day window
)
With a high-frequency feature view (e.g. 10-minute ETL batches → ~8 640 rows/day per entity × many entities), a worker with ≤ 8 GB RAM will exhaust memory and crash with no informative error from Feast.
Root cause
Both materialize() and materialize_incremental() delegate to materialize_single_feature_view exactly once per feature view, passing the full [start, end] window. The underlying data source query materialises the entire range in one shot — there is no pagination, chunking, or streaming at the Feast SDK layer.
Impact
| Scenario | Effect |
|---|---|
| Multi-day / multi-week backfill | Worker OOM crash |
| Sub-minute sensor data at scale | Worker OOM crash |
| Large number of entities × long window | Worker OOM crash |
| Crash recovery | most_recent_end_time is not committed until the entire range succeeds, so a crash forces a full re-run |
Current workaround
Users must implement their own loop outside Feast:
chunk = timedelta(hours=6)
cursor = start
while cursor < end:
next_cursor = min(cursor + chunk, end)
fs.materialize(cursor, next_cursor)
cursor = next_cursor
This is error-prone, not integrated with materialize_incremental's watermark, and must be reimplemented by every affected user.
Expected behaviour
Feast should provide a native chunk_size option so users can cap peak memory usage without external orchestration. Chunking should:
- Be opt-in and backward-compatible (default: no chunking).
- Support a project-level default in
feature_store.yamlundermaterialization.chunk_size. - Commit
most_recent_end_timeper chunk so a crash mid-run allowsmaterialize_incrementalto resume from the last committed chunk. - Be available via both the Python SDK and the CLI.
Related
A PR implementing the above is available for review: https://github.com/feast-dev/feast/pull/6277
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 1.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 107
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from feast-dev/feast
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
BigQuery data quality monitoring fails: PRIMARY KEY placed outside the column list in monitoring table DDLPossibly taken @liron-velocity claimed this 50 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
get_online_features silently drops a join key value when it shares a name with an OnDemandFeatureView's RequestSource fieldPossibly taken @OHMFOHS claimed this 99 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
kind/bug priority/p2
Difficulty 1/5 Under an hour Newbie friendliness 90/100
feast-dev/feast#6778 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
future-agi/future-agi#6392 ·
Maintainers usually reply within 1 day
-
memmapped_arange ignores the start value and drops the last point above the memmap thresholdPossibly taken @prathameshfuke claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
StingraySoftware/HENDRICS#213 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
bot-triaged module: decompositions module: edge cases module: int overflow module: primTorch oncall: pt2 triage review
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day