Skip to content

Support database option at Valkey connector #2307

Merged
sammshen merged 3 commits intoLMCache:devfrom
bluayer:feature/valkey-numbered-databases
Mar 16, 2026
Merged

Support database option at Valkey connector #2307
sammshen merged 3 commits intoLMCache:devfrom
bluayer:feature/valkey-numbered-databases

Conversation

@bluayer
Copy link
Copy Markdown
Contributor

@bluayer bluayer commented Dec 24, 2025

What this PR does / why we need it:
Valkey 9.0 now supports cluster-mode numbered databases, just like in standalone mode. This PR is to support this(numbered database) in LMCache as well.

Special notes for your reviewers:

If applicable:

  • this PR contains user facing changes - docs added
  • this PR contains unit tests

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @bluayer, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the LMCache Valkey connector to support numbered databases, a feature recently introduced in Valkey 9.0 and Valkey-GLIDE 2.1+. This change allows users to specify a database ID in their Valkey cluster configurations, providing greater flexibility and control over data organization within the Valkey environment.

Highlights

  • Valkey Database Support: The Valkey connector now supports numbered databases, aligning with new capabilities in Valkey 9.0+ and Valkey-GLIDE 2.1+.
  • Configuration Update: The ValkeyConnector class has been updated to accept an optional database_id parameter, which is then passed to the GlideClusterClientConfiguration.
  • Documentation Added: New documentation has been added to docs/source/kv_cache/storage_backends/valkey.rst demonstrating how to configure Valkey with numbered databases in cluster mode.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@bluayer bluayer force-pushed the feature/valkey-numbered-databases branch from 944fd91 to 826a949 Compare December 24, 2025 15:31
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for numbered databases in the Valkey cluster connector, which is a useful feature enhancement. The changes correctly update the connector logic and the documentation. I have two suggestions to improve the implementation's robustness and maintainability. One is a high-severity recommendation to refactor the connector adapter to be stateless, preventing potential configuration bugs. The other is a medium-severity suggestion to improve consistency in how the database ID is handled during client configuration.

Comment thread lmcache/v1/storage_backend/connector/valkey_adapter.py
Comment thread lmcache/v1/storage_backend/connector/valkey_connector.py
Copy link
Copy Markdown
Collaborator

@DongDongJu DongDongJu left a comment

Choose a reason for hiding this comment

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

LGTM,
Could you add the some more description in doc difference among the cluster modes?(nodes, endpoint, databases)

@bluayer
Copy link
Copy Markdown
Contributor Author

bluayer commented Dec 31, 2025

Thank you for your time, @DongDongJu.
I added description in doc about differences of configurations for cluster-mode.

@bluayer
Copy link
Copy Markdown
Contributor Author

bluayer commented Feb 26, 2026

Hi, @DongDongJu and @sammshen.

I know you're busy, so I apologize for the mention. When you have a moment, could you let me know if there's anything else I should address to help move the PR review forward?

Copy link
Copy Markdown
Contributor

@sammshen sammshen left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Collaborator

@DongDongJu DongDongJu left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for revise.

@DongDongJu DongDongJu enabled auto-merge (squash) March 4, 2026 18:20
@github-actions github-actions Bot added the full Run comprehensive tests on this PR label Mar 4, 2026
bluayer added 3 commits March 11, 2026 17:22
Signed-off-by: Jungwoo Song <bluayer@gmail.com>
Signed-off-by: Jungwoo Song <bluayer@gmail.com>
Signed-off-by: Jungwoo Song <bluayer@gmail.com>
auto-merge was automatically disabled March 11, 2026 08:22

Head branch was pushed to by a user without write access

@bluayer bluayer force-pushed the feature/valkey-numbered-databases branch from 9101e04 to 63386fa Compare March 11, 2026 08:22
@github-actions github-actions Bot removed the full Run comprehensive tests on this PR label Mar 11, 2026
@bluayer
Copy link
Copy Markdown
Contributor Author

bluayer commented Mar 11, 2026

Could my code be causing the CI failure? I'm not sure what the cause is...

@sammshen sammshen enabled auto-merge (squash) March 16, 2026 05:39
@github-actions github-actions Bot added the full Run comprehensive tests on this PR label Mar 16, 2026
@sammshen sammshen merged commit d6661f1 into LMCache:dev Mar 16, 2026
29 of 30 checks passed
hyunyul-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Mar 20, 2026
* feat: support clsuter-mode numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: for numbered database

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: add desc for cluster-mode and numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

---------

Signed-off-by: Jungwoo Song <bluayer@gmail.com>
realAaronWu pushed a commit to realAaronWu/LMCache that referenced this pull request Mar 20, 2026
* feat: support clsuter-mode numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: for numbered database

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: add desc for cluster-mode and numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

---------

Signed-off-by: Jungwoo Song <bluayer@gmail.com>
Signed-off-by: Aaron Wu <aaron.wu@dell.com>
deng451e pushed a commit to deng451e/LMCache that referenced this pull request Mar 25, 2026
* feat: support clsuter-mode numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: for numbered database

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: add desc for cluster-mode and numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

---------

Signed-off-by: Jungwoo Song <bluayer@gmail.com>
deng451e pushed a commit to deng451e/LMCache that referenced this pull request Mar 27, 2026
* feat: support clsuter-mode numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: for numbered database

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: add desc for cluster-mode and numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

---------

Signed-off-by: Jungwoo Song <bluayer@gmail.com>
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
* feat: support clsuter-mode numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: for numbered database

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: add desc for cluster-mode and numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

---------

Signed-off-by: Jungwoo Song <bluayer@gmail.com>
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
* feat: support clsuter-mode numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: for numbered database

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

* docs: add desc for cluster-mode and numbered databases

Signed-off-by: Jungwoo Song <bluayer@gmail.com>

---------

Signed-off-by: Jungwoo Song <bluayer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full Run comprehensive tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants