13 Commits

Author SHA1 Message Date
Tyson Andre
486e39e86e Add a ZMSCORE command returning an array of scores. (#7593)
Syntax: `ZMSCORE KEY MEMBER [MEMBER ...]`

This is an extension of #2359
amended by Tyson Andre to work with the changed unstable API,
add more tests, and consistently return an array.

- It seemed as if it would be more likely to get reviewed
  after updating the implementation.

Currently, multi commands or lua scripting to call zscore multiple times
would almost definitely be less efficient than a native ZMSCORE
for the following reasons:

- Need to fetch the set from the string every time instead of reusing the C
  pointer.
- Using pipelining or multi-commands would result in more bytes sent by
  the client for the repeated `ZMSCORE KEY` sections.
- Need to specially encode the data and decode it from the client
  for lua-based solutions.
- The fastest solution I've seen for large sets(thousands or millions)
  involves lua and a variadic ZADD, then a ZINTERSECT, then a ZRANGE 0 -1,
  then UNLINK of a temporary set (or lua). This is still inefficient.

Co-authored-by: Tyson Andre <tysonandre775@hotmail.com>
2020-08-04 17:49:33 +03:00
WuYunlong
ed326b743a Handle keys with hash tag when computing hash slot using tcl cluster client. 2020-05-11 13:14:18 +08:00
Yossi Gottlieb
10ffeb03e4 TLS: Connections refactoring and TLS support.
* Introduce a connection abstraction layer for all socket operations and
integrate it across the code base.
* Provide an optional TLS connections implementation based on OpenSSL.
* Pull a newer version of hiredis with TLS support.
* Tests, redis-cli updates for TLS support.
2019-10-07 21:06:13 +03:00
antirez
e9cd997869 Fix to Cluster test to support @busport format. 2016-02-02 11:03:53 +01:00
antirez
72640fe5fc Cluster test: also write from Lua script in resharding test. 2015-01-09 11:23:22 +01:00
antirez
f866ae1e91 cluster.tcl: fix redis links leak in refresh_nodes_map. 2014-05-14 09:10:03 +02:00
antirez
43c3cb9a57 cluster.tcl: saner error handling.
Better handling of connection errors in order to update the table and
recovery, populate the startup nodes table after fetching the list of
nodes.

More work to do about it, it is still not as reliable as
redis-rb-cluster implementation which is the minimal reference
implementation for Redis Cluster clients.
2014-05-14 00:15:52 +02:00
antirez
a2e66ad128 Cluster: Tcl cluster client: handle MOVED/ASK. 2014-05-02 15:35:08 +02:00
antirez
6bfd9d131d Cluster: Tcl cluster client: slots-nodes map and close method.
Now the client is able to actually run commands in a Redis Cluster
assuming the slots->nodes map is stable.
2014-05-02 10:56:02 +02:00
antirez
b865ad41c8 Cluster: Tcl cluster client: build nodes representation. 2014-05-02 10:19:28 +02:00
antirez
bbaddc42ae Cluster: Tcl cluster client: get nodes description. 2014-05-02 09:55:27 +02:00
antirez
03f3698b59 Cluster: Tcl cluster client key -> hashslot. 2014-04-30 18:55:28 +02:00
antirez
99eb3ba709 Cluster test: Tcl cluster library initial skeleton. 2014-04-30 15:47:19 +02:00