| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Thread registry.enable_online_feature_view_versioning through _table_id so that, when it is enabled, each feature view version gets its own HBase table (test_project:driver_stats_v2) instead of all versions sharing one. The version is appended via compute_versioned_name rather than by calling compute_table_id, because HBase addresses tables as namespace:table while compute_table_id joins with an underscore. Building the name here keeps the ':' separator, and with versioning disabled the table name is unchanged. Row keys stay unversioned. They are already suffixed with the feature view name to disambiguate views sharing a table, and since the table itself is now version-scoped the version would be redundant there; leaving them alone keeps existing keys stable and keeps the write and read paths computing identical keys, which a test pins. HbaseOnlineStore is deliberately not added to the versioned-read allowlist: online_read builds its result by iterating the rows HBase returned rather than the entity keys requested, so a missing row shortens the list instead of yielding (None, None) in place. That contract gap is pre-existing and independent of versioning. See the PR description. Part of feast-dev#2728. Closes feast-dev#6175 Signed-off-by: arose26 <145766958+arose26@users.noreply.github.com>
|
⚠️ Please install the Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #6755 +/- ##
==========================================
+ Coverage 47.12% 47.17% +0.04%
==========================================
Files 416 417 +1
Lines 50614 51385 +771
Branches 7267 7437 +170
==========================================
+ Hits 23853 24242 +389
- Misses 25072 25405 +333
- Partials 1689 1738 +49
... and 21 files with indirect coverage changes Continue to review full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Closes #6175. Part of #2728.
What this does
Threads registry.enable_online_feature_view_versioning through HbaseOnlineStore._table_id,
so that with versioning enabled each feature view version gets its own HBase table
(test_project:driver_stats_v2) instead of all versions sharing one. The store already
funnelled all five call sites — online_write_batch, online_read, update (both the keep
and delete loops) and teardown — through that one method, so the change is localised there.
Why not compute_table_id
The merged Milvus (#6330) and FAISS (#6256) stores use compute_table_id, which joins as
{project}_{name}[_v{N}]. HBase addresses tables as namespace:table, and this store has
always produced f"{project}:{table.name}". So the name is built here from
compute_versioned_name instead, preserving the : separator and putting the version on the
table half where it belongs. With versioning disabled the result is byte-identical to today's,
which the enable_versioning=False cases pin.
Row keys are left unversioned
_hbase_row_key still returns {entity_id}#{feature_view_name}. The existing comment explains
the suffix disambiguates feature views that share a table; now that the table itself is
version-scoped, adding the version to the key would be redundant. Leaving it alone keeps
existing row keys stable, and — more importantly — keeps the write and read paths computing
identical keys, which test_write_and_read_agree_on_row_keys pins directly.
Why HBase is not added to the versioned-read allowlist
I checked the read path rather than assuming it. HbaseOnlineStore.online_read builds its
result by iterating the rows HBase returned, not the entity keys requested:
HBaseConnector.rows passes straight through to happybase's Table.rows, which omits keys
that do not exist. So a miss shortens the list rather than yielding (None, None) in place,
and the result stops corresponding positionally to entity_keys — the contract sqlite.py
implements. Demonstrated with mocks, no HBase required:
That gap is pre-existing and orthogonal to versioning, so I have left it out of scope rather
than widening this PR — versioned scalar reads stay correctly gated behind
VersionedOnlineReadNotSupported until it is addressed. Happy to open a separate issue, or to
take it in a follow-up.
Tests
New sdk/python/tests/unit/infra/online_store/test_hbase_versioning.py, 15 tests,
MagicMock-based in the same style as the merged test_milvus_versioning.py, and
importorskip-guarded on happybase.
projection.version_tag takes priority over current_version_number; version 0 gets no
suffix; the : namespace separator is preserved
versioned table — write is parametrized so the unversioned case is asserted as the control
decode path still round-trips
Verified red-before/green-after: with the source change reverted, the four routing tests fail
while the unversioned control and both invariant tests still pass, so they test the change
rather than the setup.
Regression check across the 55 unit test files touching online stores or versioning: the set of
failing and erroring tests is identical with and without this change (diff of the sorted
FAILED/ERROR lines is empty). Those pre-existing failures are missing optional dependencies
in my environment. ruff check, ruff format and mypy are clean on both files.
🤖 Written with Claude Code (Claude Opus 5), reviewed by @arose26.