GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow Feast Spark materialization to use staging for large dataset spill (avoid driver OOM) · Issue #5671 · feast-dev/feast

Allow Feast Spark materialization to use staging for large dataset spill (avoid driver OOM) #5671

New issue
Copy link
New issue
Copy link
Closed
Closed
Allow Feast Spark materialization to use staging for large dataset spill (avoid driver OOM)#5671
Copy link
Labels
kind/featureNew feature or requestNew feature or request

Description

@chimeyrock999
chimeyrock999
opened on Oct 16, 2025
Issue body actions

Is your feature request related to a problem? Please describe.

When running store.materialize_incremental() with a Spark-based offline store, Feast currently converts Spark DataFrames to Arrow tables using toPandas() or collect().
This loads the entire dataset into driver memory, causing OutOfMemoryError or spark.driver.maxResultSize exceeded for large datasets.

Although Feast already supports a staging configuration for exporting data, it is not yet used during materialization. As a result, large-scale jobs cannot leverage staging to spill data to disk or remote storage.

Describe the solution you'd like

Enable the existing staging configuration to be used for materialization in the Spark offline store.
When enabled, Feast should write intermediate Spark DataFrames to the staging location (e.g. local disk or S3) before reading them back as Arrow tables for online ingestion.

Example configuration:

offline_store:
  type: spark
  staging_location: s3://bucket/tmp/feast_arrow
  staging_allow_materialize: true

This would allow Feast to handle large datasets safely without driver OOM, by spilling intermediate data to the configured staging location.

Describe alternatives you've considered

  • Increasing driver memory (spark.driver.memory, spark.driver.maxResultSize) — only delays the problem.
  • Using toLocalIterator() — too slow and still limited by memory.

Additional context

During feast materialize with large Spark datasets, jobs fail due to driver OOM even though executors have available resources.
Example error:

Total size of serialized results (2.1 GiB) is bigger than spark.driver.maxResultSize (2.0 GiB)
Caused by: java.lang.OutOfMemoryError: Java heap space

Allowing materialization to use staging would make Feast’s Spark integration far more scalable and production-ready.

Reacted by Jacob Weinhold
Reacted by Jacob Weinhold

Activity

  1. chimeyrock999
    added
    kind/featureNew feature or requestNew feature or request
    on Oct 16, 2025
  2. chimeyrock999 commented on Oct 16, 2025

    @chimeyrock999
    chimeyrock999
    on Oct 16, 2025
    ContributorAuthor
    More actions

    I've reviewed the implementation of the SparkComputeEngine and the new FeastDataFrame (v3).
    From what I can see, when using the Spark engine, the entire materialization flow runs fully distributed inside Spark (via SparkWriteNode and mapInArrow), avoiding any .collect() or .toPandas() conversions.

    However, when running under LocalComputeEngine (or other non-Spark compute engines), Feast still calls RetrievalJob.to_arrow(), which collects the Spark DataFrame into driver memory before converting it to Arrow.

    While this proposal might not be as critical for Spark-based compute engines, it could still be useful for LocalComputeEngine and other future engines that operate in a non-distributed or semi-local mode — helping to reduce OOM risk and improve stability for large dataset

    Reacted by Jacob Weinhold
    Reacted by Jacob Weinhold
  3. jfw-ppi
    added 3 commits that reference this issue on Dec 28, 2025

    feat: support staging for spark materialization (feast-dev#5671)

    2544cb0

    feat: support staging for spark materialization (feast-dev#5671)

    fb985ae

    feat: support staging for spark materialization (feast-dev#5671)

    88636de
  4. jfw-ppi commented on Dec 28, 2025

    @jfw-ppi
    jfw-ppi
    on Dec 28, 2025
    Collaborator
    More actions

    I implemented a solution, would you be able to review it @chimeyrock999 ?
    PR: #5797

  5. jfw-ppi
    added a commit that references this issue on Dec 31, 2025

    feat: support staging for spark materialization ([feast-dev#5671](fea…

    b3ba611
  6. ntkathole
    added 3 commits that reference this issue on Jan 2, 2026

    feat: support staging for spark materialization (feast-dev#5671)

    fb4e855

    feat: support staging for spark materialization ([feast-dev#5671](fea…

    e8e9163

    feat: Support staging for spark materialization (#5671) (#5797)

    5b787af
  7. franciscojavierarceo
    added a commit that references this issue on Jan 16, 2026

    chore(release): release 0.59.0

    6214d05
  8. kyledepasquale
    added a commit that references this issue on Jan 21, 2026

    chore(release): release 0.59.0

    b52f528
  9. YassinNouh21
    added 2 commits that reference this issue on Feb 7, 2026

    chore(release): release 0.59.0

    61dff40

    chore(release): release 0.59.0

    ac546ff
  10. jyejare
    added 2 commits that reference this issue on Mar 9, 2026

    feat: Support staging for spark materialization (feast-dev#5671) (fea…

    a2525ab

    chore(release): release 0.59.0

    dedd393
  11. ntkathole
    closed this as completedon Apr 26, 2026
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

    kind/featureNew feature or requestNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.