redis集群不支持事务multi、exec

  • multi后不能执行get,没有结果返回的
  • 也不能redirected,否则exec不行
132.120.2.134:26000> MULTI
OK
132.120.2.134:26000> get abc
QUEUED
132.120.2.134:26000> GET ABC
-> Redirected to slot [14740] located at 132.120.2.135:26001
(nil)
132.120.2.135:26001> SET ABC 2
OK
132.120.2.135:26001> GETSET
(error) ERR wrong number of arguments for 'getset' command
132.120.2.135:26001> EXEC
(error) ERR EXEC without MULTI

set如果redirected同样不行

132.120.2.135:26001> multi
OK
132.120.2.135:26001> set abc 1
-> Redirected to slot [7638] located at 132.120.2.134:26000
OK

multi可以小写,命令不区分大小写。 但是key区分。abc和ABC不同。

posted @ 2021-10-23 23:56  Tracydzf  阅读(577)  评论(0编辑  收藏  举报