Skip to content

[redis_proxy] Add support for SELECT and KEYS - #37706

Merged
mattklein123 merged 3 commits into
envoyproxy:mainfrom
duanhongyi:main
Dec 22, 2024
Merged

mattklein123 merged 3 commits into
envoyproxy:mainfrom
duanhongyi:main

Conversation

@duanhongyi

Copy link
Copy Markdown
Contributor

This RP mainly improves the compatibility of redis proxy, improvement as follows:

  • Add support for the select command, referring to the implementation of Apache KVRocks and Microsoft Garnet, simply returns OK.
  • Add keys command support, send keys commands to each shard on the backend, and then merge the results.
  • For unsupport commands, the return value is the same as Redis, because some clients judge this return value, for example, Java lettuce client

@repokitteh-read-only

Copy link
Copy Markdown

Hi @duanhongyi, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #37706 was opened by duanhongyi.

see: more, trace.

@duanhongyi
duanhongyi force-pushed the main branch 5 times, most recently from 8585977 to 2d6baa7 Compare December 18, 2024 11:42

@adisuissa adisuissa 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.

Assigning @weisisea @mattklein123 as codeowners
/assign @weisisea @mattklein123

@mattklein123 mattklein123 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM at a high level. Can you fix the typo comments and then push to see if we can get CI green?

/wait

@duanhongyi

duanhongyi commented Dec 19, 2024 •

Copy link
Copy Markdown
Contributor Author

I rebased the last commit, mainly to solve the compatibility issues of the Java client.

@mattklein123

@duanhongyi
duanhongyi force-pushed the main branch 6 times, most recently from 8af3e65 to 488fcda Compare December 20, 2024 10:30
@duanhongyi

duanhongyi commented Dec 20, 2024 •

Copy link
Copy Markdown
Contributor Author

There is still one that hasn't turned green, I will add some test cases later.

Code coverage for source/extensions/filters/network/redis_proxy is lower than limit of 96.6 (95.5)

@duanhongyi
duanhongyi force-pushed the main branch 2 times, most recently from 85b3e73 to 7fb8c98 Compare December 21, 2024 13:17
@duanhongyi

Copy link
Copy Markdown
Contributor Author

Okay, all the checks have been passed.

@mattklein123

@mattklein123
mattklein123 merged commit 712b736 into envoyproxy:main Dec 22, 2024
mattklein123 pushed a commit that referenced this pull request Jun 17, 2025
Commit Message: redis_proxy: Add full implementation of select

Additional Description: The implementation of the SELECT command in the
existing [PR #37706](#37706) was
incorrect. It only modified the client’s visible state without actually
changing the selected database. This PR provides a proper implementation
of the SELECT command.

Risk Level: Low

Testing:unit test

Docs Changes: no

Release Notes:
Platform Specific Features:

Signed-off-by: qero.9ram <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants