Visitar URL original
feat: Add remote materialization support via feature server by aniketpalu · Pull Request #6590 · feast-dev/feast · GitHub
Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(server): Add ?force=true to override stuck MATERIALIZING state
When ?async=true&force=true, the 409 concurrency guard is skipped,
allowing operators to re-trigger materialization for FVs stuck in
MATERIALIZING state (e.g. after a crashed SparkApplication pod).
force=true without async=true has no effect.
Also updates the 409 error message to hint at ?force=true.

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
  • Loading branch information
aniketpalu committed Jul 28, 2026
commit b2d35c23ef100bc0fbf329e6d86718ff62afac10
19 changes: 12 additions & 7 deletions sdk/python/feast/feature_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,8 @@ def _check_already_materializing(
content={
"error": (
f"Cannot start async materialization — the following feature "
f"views are already in MATERIALIZING state: {conflicting}"
f"views are already in MATERIALIZING state: {conflicting}. "
f"Use ?force=true to override."
),
"feature_views": conflicting,
},
Expand Down Expand Up @@ -893,15 +894,17 @@ async def chat_ui():
async def materialize(
request: MaterializeRequest,
async_mode: bool = Query(False, alias="async"),
force: bool = Query(False),
):
with feast_metrics.track_request_latency("/materialize"):
fv_names = _authorize_materialize_views(store, request.feature_views)
start_date, end_date = _parse_materialize_timestamps(request)

if async_mode:
conflict = _check_already_materializing(store, fv_names)
if conflict:
return conflict
if not force:
conflict = _check_already_materializing(store, fv_names)
if conflict:
return conflict

_update_fv_state(store, fv_names, FeatureViewState.MATERIALIZING)

Expand Down Expand Up @@ -943,15 +946,17 @@ def _run_materialize():
async def materialize_incremental(
request: MaterializeIncrementalRequest,
async_mode: bool = Query(False, alias="async"),
force: bool = Query(False),
):
with feast_metrics.track_request_latency("/materialize-incremental"):
fv_names = _authorize_materialize_views(store, request.feature_views)
end_date = utils.make_tzaware(parser.parse(request.end_ts))

if async_mode:
conflict = _check_already_materializing(store, fv_names)
if conflict:
return conflict
if not force:
conflict = _check_already_materializing(store, fv_names)
if conflict:
return conflict

_update_fv_state(store, fv_names, FeatureViewState.MATERIALIZING)

Expand Down
Loading