-
Notifications
You must be signed in to change notification settings - Fork 27
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
THREESCALE-11061: Async mode: Add support for Redis logical DBs #390
THREESCALE-11061: Async mode: Add support for Redis logical DBs #390
Conversation
From #389 (comment):
I don't understand what you mean. I'm not monkey patching the original protocol class, I added a new class |
Because I saw you using the |
# RESP2 with support for logical DBs | ||
def make_redis_protocol(opts) | ||
uri = URI(opts[:url] || "") | ||
db = uri.path[1..-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking whether we need to report an error if the db
is not an integer.
Or just let the client respond to select {invalid-value}
with whatever it likes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I wouldn't bother reraising this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree with @akostadinov
True. Fixed in 41a9925 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! It's a bummer that Redis
is somehow conflicting though. I'm fine to keep it as is. One possible option is to call the module AsyncRedis
for example. But I leave it to your preference.
Yeah, I think I'm gonna rename it. |
@akostadinov done in 7a2da06 |
This comes from of #350.
Now the Async mode supports Redis logical databases, and honors URLs like
redis://localhost:6379/6
The support has been also added for sentinels. A typical config would look like this:
Jira: https://issues.redhat.com/browse/THREESCALE-11061