-
Notifications
You must be signed in to change notification settings - Fork 663
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
fix: readonly client moved inconsistency #1284
base: unstable
Are you sure you want to change the base?
fix: readonly client moved inconsistency #1284
Conversation
Signed-off-by: proost <jwalag87@gmail.com>
…ix-inconsistency-moved-readonly-client Signed-off-by: proost <jwalag87@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1284 +/- ##
============================================
+ Coverage 70.56% 70.71% +0.14%
============================================
Files 114 114
Lines 63147 63160 +13
============================================
+ Hits 44560 44663 +103
+ Misses 18587 18497 -90
|
if (n == NULL || !clusterNodeIsMyself(n)) { | ||
if (error_code == CLUSTER_REDIR_MOVED || error_code == CLUSTER_REDIR_ASK) { | ||
int port = clusterNodeClientPort(n, connIsTLS(original_c->conn)); | ||
*err = sdscatprintf(sdsempty(), "-%s %d %s:%d", (error_code == CLUSTER_REDIR_ASK) ? "ASK" : "MOVED", | ||
hashslot, clusterNodePreferredEndpoint(n, c), port); | ||
return C_ERR; | ||
} |
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.
Could we use clusterRedirectClient
method instead of handling the error manually?
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.
unforunately, we can't because after returned scriptVerifyWriteCommandAllow
we should go to "error" label.
in the error
label, handling reply.
…ix-readonly-client-moved-inconsistency Signed-off-by: proost <jwalag87@gmail.com>
issue: #869
When client is read-only and client send lua script with write command to replica, return redirect response