-
Notifications
You must be signed in to change notification settings - Fork 43
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
Return re-connection failures immediately #159
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,24 +28,6 @@ EXPECT CONNECT | |
EXPECT ["SET", "bar", "initial"] | ||
SEND +OK | ||
|
||
# A reconnect failure triggers a search for an available node | ||
EXPECT ["PING"] | ||
SEND +PONG | ||
EXPECT ["SET", "foo", "second"] | ||
SEND -MOVED 12182 127.0.0.1:7402 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, looking at the commits one by one explains it. :) Legacy: After N failed reconnect attempts, it sends the command to a random node and gets a redirect (after PING), then slot map update? Then the same thing is repeated M times. I don't get it exactly. Is maxretry = N or maxretry = M? |
||
|
||
# Since maxretry=2 a MOVED triggers a slotmap update (no slotmap change in this test) | ||
EXPECT CONNECT | ||
EXPECT ["CLUSTER", "SLOTS"] | ||
SEND [[0, 6000, ["127.0.0.1", 7401, "nodeid1"]],[6001, 16383, ["127.0.0.1", 7402, "nodeid2"]]] | ||
EXPECT CLOSE | ||
|
||
# A reconnect failure triggers a new search for an available node | ||
EXPECT ["PING"] | ||
SEND +PONG | ||
|
||
# Max retry exhausted | ||
|
||
EXPECT CLOSE | ||
EOF | ||
server1=$! | ||
|
@@ -95,7 +77,7 @@ fi | |
expected="OK | ||
OK | ||
error: Server closed the connection | ||
error: too many cluster retries" | ||
error: Connection refused" | ||
|
||
cmp "$testname.out" <(echo "$expected") || exit 99 | ||
|
||
|
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 saw this too but I thought
ssl_init_fn
is supposed to handle a connection which failed to reconnect.It seems cleaner to return ASAP though, but I'd like to understand the consequences better.