Huang Zhw 8892b5cf9e When redis-cli received ASK, it didn't handle it (#8930)
When redis-cli received ASK, it used string matching wrong and didn't
handle it.

When we access a slot which is in migrating state, it maybe
return ASK. After redirect to the new node, we need send ASKING
command before retry the command.  In this PR after redis-cli receives
ASK, we send a ASKING command before send the origin command
after reconnecting.

Other changes:
* Make redis-cli -u and -c (unix socket and cluster mode) incompatible
  with one another.
* When send command fails, we avoid the 2nd reconnect retry and just
  print the error info. Users will decide how to do next.
  See #9277.
* Add a test faking two redis nodes in TCL to just send ASK and OK in
  redis protocol to test ASK behavior.

Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Co-authored-by: Oran Agra <oran@redislabs.com>
(cherry picked from commit cf61ad14cc45787e57d9af3f28f41462ac0f2aa2)
2021-10-04 13:59:40 +03:00
..
2020-11-09 21:48:56 -08:00
2016-06-07 16:46:00 -04:00
2020-04-24 17:11:21 -07:00
2019-02-24 21:38:15 +01:00
2021-04-06 12:42:18 +03:00
2020-10-27 15:04:18 +02:00
2021-02-24 10:10:02 +02:00
2020-05-05 23:35:08 -04:00
2019-11-19 17:23:47 +08:00
2019-10-02 11:30:20 +02:00
2021-04-01 12:45:15 +03:00
2021-06-01 17:03:36 +03:00
2021-01-04 17:02:57 +02:00
2021-01-28 16:19:43 +02:00
2020-07-21 08:13:05 +03:00
2021-07-21 21:06:49 +03:00