-
Notifications
You must be signed in to change notification settings - Fork 677
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 <[email protected]>
…ix-inconsistency-moved-readonly-client Signed-off-by: proost <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## unstable #1284 +/- ##
============================================
+ Coverage 70.57% 70.62% +0.04%
============================================
Files 117 117
Lines 63320 63333 +13
============================================
+ Hits 44690 44730 +40
+ Misses 18630 18603 -27
|
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 <[email protected]>
issue: #869
When client is read-only and client send lua script with write command to replica, return redirect response