Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ignoring SELECT from client #431

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rosmo
Copy link

@rosmo rosmo commented Nov 12, 2015

Even if you are just using database 0, some developers want to call Redis' SELECT command always up front. This add a new redis_ignore_select option to pools to simply return OK for any SELECT command.

@Fgruntjes
Copy link

+1 would really like to see this merged, this prevents us from using twemproxy i.c.m. with Magento sessions.

@CLAassistant
Copy link

CLAassistant commented Jul 18, 2019

CLA assistant check
All committers have signed the CLA.

@@ -2695,7 +2704,11 @@ redis_reply(struct msg *r)
switch (r->type) {
case MSG_REQ_REDIS_PING:
return msg_append(response, rsp_pong.data, rsp_pong.len);

case MSG_REQ_REDIS_SELECT:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Alternately or additionally, it may be safe to allow forwarding this entirely if the db number is equivalent to the one in the config file for redis_db (pool->redis_db)

…s SELECT commands

and always replies with OK.
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