Skip to content

fix: Use the configured keyspace on the first ScyllaDB read/write - #7231

Open
anasdahani220 wants to merge 1 commit into
feast-dev:masterfrom
anasdahani220:fix/scylladb-first-call-keyspace
Open

anasdahani220 wants to merge 1 commit into
feast-dev:masterfrom
anasdahani220:fix/scylladb-first-call-keyspace

Conversation

@anasdahani220

@anasdahani220 anasdahani220 commented Nov 24, 2026 •

Copy link
Copy Markdown

Fixes #7226

online_write_batch, online_read and retrieve_online_documents_v2 built the
table name with self._keyspace before calling self._get_session(config), which
is where _keyspace is set from the config. On the first call in a process the
name still used the class default feast_keyspace, so the first statement was
prepared against the wrong keyspace.

The three methods now get the session first, like _create_table and
_drop_table already do.

Added unit tests with a mocked session (no ScyllaDB needed) that check the first
write and the first read prepare their statement against the configured keyspace.
Both fail on master ("feast_keyspace"."proj_fv") and pass with this change.

Release note:
ScyllaDB online store: the first read/write in a process now uses the configured keyspace instead of the default "feast_keyspace".

I used Claude to help me find the cause and write the tests.


Devin Review

Signed-off-by: anasdahani220 <anasdahani220@gmail.com>
@anasdahani220
anasdahani220 requested a review from a team as a code owner November 24, 2026 17:39

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 3 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

@anasdahani220

Copy link
Copy Markdown
Author

Could a maintainer add the kind/bug label? I don't have permission to set it.

The Devin flags look non-blocking to me: the vector search path gets the same one-line change as read/write, and the test helpers follow the style of the other unit tests. Happy to add a test for retrieve_online_documents_v2 too if you'd like.

@codecov-commenter

codecov-commenter commented Nov 25, 2026 •

Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 54.27%. Comparing base (a291a0f) to head (3a91908).

Files with missing lines Patch % Lines
...ra/online_stores/scylladb_online_store/scylladb.py 66.66% 1 Missing ⚠️
❗ 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    #7231      +/-   ##
==========================================
+ Coverage   54.10%   54.27%   +0.16%     
==========================================
  Files         467      467              
  Lines       58940    58940              
  Branches     8688     8688              
==========================================
+ Hits        31890    31990     +100     
+ Misses      24892    24786     -106     
- Partials     2158     2164       +6     
Flag Coverage Δ
go-feature-server 30.96% <ø> (ø)
python-unit 55.88% <66.66%> (+0.18%) ⬆️
Files with missing lines Coverage Δ
...ra/online_stores/scylladb_online_store/scylladb.py 36.72% <66.66%> (+36.72%) ⬆️

... and 1 file with indirect coverage changes


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 a291a0f...3a91908. 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.

@anasdahani220

Copy link
Copy Markdown
Author

Thanks for the review! None of the 3 failing checks reach the ScyllaDB code. The integration job fails with uv: not found, the registration job fails at AWS login (invalid token), and the macOS unit job has 2 feast init / feast apply timeouts (120s) in unrelated tests. The keyspace tests pass.

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.

ScyllaDBOnlineStore: first read/write in a process uses the default keyspace "feast_keyspace"

3 participants