-
Notifications
You must be signed in to change notification settings - Fork 119
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
Load script on all master nodes in cluster #418
Conversation
Code LGTM, though it doesn't feel right to special case this particular command. But I don't have a better suggestion at the moment :-) |
An alternative suggestion would be to expose API on |
Oh I totally agree this should work out of the box, without reaching for any special API. We will need to do something similar to properly support Redis transactions in the cluster, so please don't take my comment above as a dismissal. It's just something we need to solve, one day. Not necessarily in this PR. |
950106c
to
0244b96
Compare
We are running basic transactions just fine with a help of I could imagine a method on Is there something I need to do besides waiting in order to get this reviewed by maintainers? |
191f7ed
to
f75ee8a
Compare
When I mentioned transactions, I was thinking of something like this: quarkusio/quarkus#32361 (comment) |
src/main/java/io/vertx/redis/client/impl/RedisClusterConnection.java
Outdated
Show resolved
Hide resolved
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.
LGTM otherwise.
I don't know why CI fails, it passed just fine in a PR of mine. @MichaelKubovic could you please rebase? That might help. |
There are no new commits in master, so rebase didn't produce anything new. I've pushed a dummy commit to re-trigger build. |
You don't need to add an extra commit, you can just amend the commit on top with no changes -- that will change the commit date, which is enough. But I see that didn't help. I don't know what's wrong :-/ |
Signed-off-by: Michael Kubovic <[email protected]>
Signed-off-by: Michael Kubovic <[email protected]>
Co-authored-by: Ladislav Thon <[email protected]>
dfca88c
to
b2d4360
Compare
There was a commit in master that fixes the issue :) Rebased. |
Signed-off-by: Michael Kubovic <[email protected]>
That didn't help, so I tried to increase the container version. I run it locally with the updated version anyway + some more changes to the container setup because I can't use those ports on my MacOS. |
Signed-off-by: Michael Kubovic <[email protected]>
Another attempt, it seems SCRIPT commands must be run on master nodes only. |
Could I create a separate PR for 4.x branch to get changes in the forthcoming minor relase? |
LGTM. Backport to |
I'm just thinking, should we special-case some other WDYT? |
Yes, I think If I ever written a utility that enables And finally So my bottom line... I would treat all |
Motivation:
Redis uses command
SCRIPT LOAD
to load script to a script cache. This command should be run on every master node in cluster, otherwise node executing the script withEVALSHA
fails on nodes that didn't load the script. Currently with clustered client, allSCRIPT
commands are executed on a random node. My change handles this sub-command differently.I have also considered a solution to introduce composite keys in
REDUCERS
(command + subcommand) but thought it would be premature abstraction, so I just implemented this directly without touchingREDUCERS
.