redict/tests
Tyson Andre 6f11acbd67
Implement SMISMEMBER key member [member ...] (#7615)
This is a rebased version of #3078 originally by shaharmor
with the following patches by TysonAndre made after rebasing
to work with the updated C API:

1. Add 2 more unit tests
   (wrong argument count error message, integer over 64 bits)
2. Use addReplyArrayLen instead of addReplyMultiBulkLen.
3. Undo changes to src/help.h - for the ZMSCORE PR,
   I heard those should instead be automatically
   generated from the redis-doc repo if it gets updated

Motivations:

- Example use case: Client code to efficiently check if each element of a set
  of 1000 items is a member of a set of 10 million items.
  (Similar to reasons for working on #7593)
- HMGET and ZMSCORE already exist. This may lead to developers deciding
  to implement functionality that's best suited to a regular set with a
  data type of sorted set or hash map instead, for the multi-get support.

Currently, multi commands or lua scripting to call sismember multiple times
would almost definitely be less efficient than a native smismember
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
  and received by the client for the repeated SISMEMBER KEY sections.
- Need to specially encode the data and decode it from the client
  for lua-based solutions.
- Proposed solutions using Lua or SADD/SDIFF could trigger writes to
  memory, which is undesirable on a redis replica server
  or when commands get replicated to replicas.

Co-Authored-By: Shahar Mor <shahar@peer5.com>
Co-Authored-By: Tyson Andre <tysonandre775@hotmail.com>
2020-08-11 11:55:06 +03:00
..
assets Fix test "server is up" detection after logging changes. 2016-12-19 16:49:58 +01:00
cluster Fix tests/cluster/cluster.tcl about wrong usage of lrange. (#6702) 2020-08-04 18:00:58 +03:00
helpers revert an accidental test code change done as part of the tls project 2019-12-01 16:10:09 +02:00
integration Accelerate diskless master connections, and general re-connections (#6271) 2020-08-06 16:53:06 +03:00
modules see #7544, added RedisModule_HoldString api. (#7577) 2020-08-09 06:11:47 +03:00
sentinel TLS: Configuration options. 2019-10-07 21:07:27 +03:00
support Implement SMISMEMBER key member [member ...] (#7615) 2020-08-11 11:55:06 +03:00
tmp minor fixes to the new test suite, html doc updated 2010-05-14 18:48:33 +02:00
unit Implement SMISMEMBER key member [member ...] (#7615) 2020-08-11 11:55:06 +03:00
instances.tcl Reduce the probability of failure when start redis in runtest-cluster #7554 (#7635) 2020-08-09 06:08:00 +03:00
test_helper.tcl runtest --stop pause stops before terminating the redis server (#7513) 2020-07-13 16:09:08 +03:00