Skip to content

feat: Add consistency_level to the Milvus online store config - #6921

Open
simonhearne wants to merge 2 commits into
feast-dev:masterfrom
simonhearne:feat/milvus-consistency-level
Open

simonhearne wants to merge 2 commits into
feast-dev:masterfrom
simonhearne:feat/milvus-consistency-level

Conversation

@simonhearne

@simonhearne simonhearne commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds two optional Milvus online store settings, each Strong, Bounded, Session or Eventually:

  • consistency_level is sent with every read and search (query, search, keyword query).
  • collection_consistency_level is set when Feast creates a collection. It becomes the collection's
    default for requests that don't specify a level, e.g. from other clients.

The two are independent. When they are unset nothing is sent, so Milvus keeps its default
(Bounded), which is the current behaviour.

With Bounded, a read issued straight after materialization may briefly miss the newest writes.
consistency_level: Strong makes Feast's reads always see the latest writes, at the cost of higher
read latency, and takes effect without recreating collections.

online_store:
  type: milvus
  consistency_level: "Strong"
  collection_consistency_level: "Bounded"

Which issue(s) this PR fixes:

N/A

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests

  • Integration tests

  • Manual tests

  • Testing is not required for this change

  • Unit (mocked client): neither level sent when unset; consistency_level sent only to query,
    search and keyword query; collection_consistency_level sent only to create_collection;
    different values for each are applied independently; invalid values rejected.

  • Server: collection level is Bounded by default and follows collection_consistency_level;
    with consistency_level: Strong on a Bounded collection, a write is visible to the next read.

Unit tests run on Milvus Lite 3.2.1 (pymilvus 3.0.2). Server tests in sdk/python/tests/integration/online_store/test_milvus_remote.py are marked integration and skip unless ZILLIZ_URI and ZILLIZ_TOKEN are set; they passed against a local Milvus 2.6.0, a local Milvus 3.0.2 server and against Zilliz Cloud. The existing Milvus unit and universal integration tests pass unchanged.

Misc

Part of a series of Milvus online store improvements for Zilliz Cloud and production Milvus, following #6882, #6895 and #6917.

Adds two optional settings, each Strong, Bounded, Session or Eventually:
consistency_level is sent with every read and search, and
collection_consistency_level is set when Feast creates a collection.
When unset nothing is sent, so Milvus keeps its default (Bounded)
exactly as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Simon Hearne <simon.hearne@gmail.com>
@simonhearne
simonhearne requested a review from a team as a code owner October 1, 2026 14:01
@codecov-commenter

codecov-commenter commented Oct 1, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.63%. Comparing base (652b7f9) to head (706be05).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6921   +/-   ##
=======================================
  Coverage   48.62%   48.63%           
=======================================
  Files         427      427           
  Lines       53845    53855   +10     
  Branches     7844     7846    +2     
=======================================
+ Hits        26181    26191   +10     
  Misses      25797    25797           
  Partials     1867     1867           
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 50.00% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
.../infra/online_stores/milvus_online_store/milvus.py 72.78% <100.00%> (+0.57%) ⬆️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 652b7f9...706be05. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants