Skip to content

Add endpoint-keyed flush for batching targets - #652

Open
royischoss wants to merge 1 commit into
mlrun:developmentfrom
royischoss:ml-12996
Open

Add endpoint-keyed flush for batching targets#652
royischoss wants to merge 1 commit into
mlrun:developmentfrom
royischoss:ml-12996

Conversation

@royischoss

Copy link
Copy Markdown
Collaborator

Summary

Add an opt-in, endpoint-keyed flush fence for Storey batching targets. This lets MLRun wait until buffered and already-in-flight Parquet writes for one model endpoint are durable before acknowledging the event, without flushing or blocking unrelated endpoints.

Changes Made

  • Add flush_key_field and public async flush(flush_key) support to batching targets.
  • Track logical flush keys independently from physical partition keys, including mixed-key batches and endpoints spanning multiple partitions.
  • Serialize same-key fences, shield writes from waiter cancellation, retain write failures, and coordinate outstanding writes with termination.
  • Expose the keyed flush configuration on ParquetTarget, preserve monotonic last-written metadata, and reject unsupported single-file mode.
  • Add deterministic coverage for buffered and in-flight writes, key isolation, concurrent fences, multiple partitions, failures, cancellation, timer/max-event races, and termination.

Testing

  • make lint
  • make test — 469 passed, 1 skipped
  • pytest tests/test_flow.py -q — 275 passed

Related Issues

Additional Notes

  • Keyed tracking is disabled by default, preserving existing target behavior.
  • MLRun controller event semantics and retry policy remain outside Storey and will be implemented separately.

Made with Cursor

…ng the logic needed to track in_flight and done events
@royischoss
royischoss requested a review from gtopper September 10, 2026 10:45
@royischoss royischoss added the safe-to-test Green light for integration tests to run label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe-to-test Green light for integration tests to run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant