redis 4.8.1 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +138 -1
  3. data/README.md +285 -169
  4. data/lib/redis/client.rb +116 -611
  5. data/lib/redis/commands/bitmaps.rb +14 -4
  6. data/lib/redis/commands/cluster.rb +1 -18
  7. data/lib/redis/commands/connection.rb +5 -10
  8. data/lib/redis/commands/geo.rb +109 -7
  9. data/lib/redis/commands/hashes.rb +179 -8
  10. data/lib/redis/commands/hyper_log_log.rb +1 -1
  11. data/lib/redis/commands/keys.rb +32 -24
  12. data/lib/redis/commands/lists.rb +167 -25
  13. data/lib/redis/commands/modules/json.rb +530 -0
  14. data/lib/redis/commands/modules/search/aggregation.rb +418 -0
  15. data/lib/redis/commands/modules/search/dialect.rb +14 -0
  16. data/lib/redis/commands/modules/search/field.rb +306 -0
  17. data/lib/redis/commands/modules/search/hybrid.rb +359 -0
  18. data/lib/redis/commands/modules/search/index.rb +351 -0
  19. data/lib/redis/commands/modules/search/index_definition.rb +114 -0
  20. data/lib/redis/commands/modules/search/miscellaneous.rb +607 -0
  21. data/lib/redis/commands/modules/search/query.rb +738 -0
  22. data/lib/redis/commands/modules/search/result.rb +488 -0
  23. data/lib/redis/commands/modules/search/schema.rb +211 -0
  24. data/lib/redis/commands/modules/search.rb +19 -0
  25. data/lib/redis/commands/pubsub.rb +34 -25
  26. data/lib/redis/commands/server.rb +15 -15
  27. data/lib/redis/commands/sets.rb +76 -40
  28. data/lib/redis/commands/sorted_sets.rb +128 -19
  29. data/lib/redis/commands/streams.rb +75 -28
  30. data/lib/redis/commands/strings.rb +18 -17
  31. data/lib/redis/commands/transactions.rb +7 -31
  32. data/lib/redis/commands.rb +39 -20
  33. data/lib/redis/distributed.rb +407 -73
  34. data/lib/redis/errors.rb +20 -50
  35. data/lib/redis/hash_ring.rb +26 -26
  36. data/lib/redis/lib_identity.rb +105 -0
  37. data/lib/redis/pipeline.rb +47 -222
  38. data/lib/redis/subscribe.rb +51 -15
  39. data/lib/redis/version.rb +1 -1
  40. data/lib/redis.rb +213 -188
  41. metadata +25 -59
  42. data/lib/redis/cluster/command.rb +0 -79
  43. data/lib/redis/cluster/command_loader.rb +0 -33
  44. data/lib/redis/cluster/key_slot_converter.rb +0 -72
  45. data/lib/redis/cluster/node.rb +0 -120
  46. data/lib/redis/cluster/node_key.rb +0 -31
  47. data/lib/redis/cluster/node_loader.rb +0 -34
  48. data/lib/redis/cluster/option.rb +0 -100
  49. data/lib/redis/cluster/slot.rb +0 -86
  50. data/lib/redis/cluster/slot_loader.rb +0 -46
  51. data/lib/redis/cluster.rb +0 -315
  52. data/lib/redis/connection/command_helper.rb +0 -41
  53. data/lib/redis/connection/hiredis.rb +0 -68
  54. data/lib/redis/connection/registry.rb +0 -13
  55. data/lib/redis/connection/ruby.rb +0 -437
  56. data/lib/redis/connection/synchrony.rb +0 -148
  57. data/lib/redis/connection.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b18788ff80698e8f79fb103e7419d9ba74fb0b6a5eb55c672422cd76abff985c
4
- data.tar.gz: 1eed18a57039c677c894564ceaa1cf6bc9c0535be51501d078b09d75617a9d89
3
+ metadata.gz: 10e2b37efa4ce556e0a412006412a027693dc20e5f45df8759d2571dec5008ab
4
+ data.tar.gz: 074126dd5ed435ac137b0b946129db11ef16020afd8a65dcbe94b181beaf9198
5
5
  SHA512:
6
- metadata.gz: 5f2f7ce595d431f548c126a63c5ce697cc9e596e9b0eaa00f1e0186ae3853e73922c6e130b989ba9e026aec32f766a774433fdd1cff216420e837837db90659b
7
- data.tar.gz: 02fb8debb0d11f7b9d04f7616093535426f0ee5a0994992fcf3187ab00aa890dcd2fb248f14da49837508a3ccbb5756be208fc5d3b8dcd18ec6aaf0fb1bb1193
6
+ metadata.gz: d5cc54f6d9f95a0d77c2f824569dc9d09506eabf593c9b9d18483bae897258daf1a1fa8e069b79388ac0f8948d288cfe4af3fcea9d3760a3074bc0c4b55cb2fb
7
+ data.tar.gz: a8137ff6826639d927179a78d0017604aa34f592bd9710a777a58db0618a8061eb71aa4ee402fae928b26dc6e43a19c4248181604db17b1a584760a806fedadf
data/CHANGELOG.md CHANGED
@@ -1,4 +1,141 @@
1
- # Unreleased
1
+ # 6.0.0
2
+
3
+ ## Breaking changes
4
+
5
+ - Use RESP3 (`HELLO 3`) by default; pass `protocol: 2` to keep RESP2. `GEOPOS` and
6
+ `GEOSEARCH`/`GEORADIUS` with `WITHCOORD` now return coordinates as `Float` instead of `String`.
7
+ See [specs/migration-resp3.md](specs/migration-resp3.md). (#1351)
8
+ - Require Ruby 3.2+. (#1353, #1365)
9
+
10
+ ## New features
11
+
12
+ - Add support for the Redis Query Engine (RediSearch, `FT.*`): `ft_create`, `ft_alter`,
13
+ `ft_dropindex`, `ft_info`, `ft_search`, `ft_aggregate`, vector and hybrid search, suggestions,
14
+ dictionaries, synonyms, aliases, and spellcheck. Not supported by `Redis::Distributed`.
15
+ (#1356, #1359, #1360, #1361)
16
+ - Add support for the JSON module: `json_set`, `json_get`, `json_mset`, `json_mget`, `json_del`,
17
+ `json_forget`, `json_clear`, `json_merge`, `json_arr*`, `json_obj*`, `json_str*`,
18
+ `json_numincrby`, `json_toggle`, `json_type`, `json_debug_memory`. (#1346, #1347, #1348, #1349)
19
+ - Add `lmovem` and `blmovem` (Redis 8.10). (#1363)
20
+ - Add `sunioncard` and `sdiffcard` (Redis 8.10). (#1357)
21
+ - `xread` and `xreadgroup` now accept `max_count:` and `max_size:` (Redis 8.10). (#1358)
22
+ - Add `hexpire`, `hpexpire`, `httl` and `hpttl` (Redis 7.4). (#1324, #1325, #1331)
23
+ - `hscan` and `hscan_each` now accept `novalues: true` (Redis 7.4). (#1327)
24
+ - Add `geosearch` and `geosearchstore` (Redis 6.2); geo commands are now available on
25
+ `Redis::Distributed`. (#1342)
26
+ - `geoadd` now accepts `nx:`, `xx:` and `ch:`; geo radius searches accept `count_any:`; `xadd`
27
+ accepts `limit:` (Redis 6.2). (#1345)
28
+ - `Redis::Distributed` now implements `hscan`, `hscan_each` and `hstrlen`. (#1319)
29
+ - Identify the client to the server via `CLIENT SETINFO` (`lib-name=redis-rb`,
30
+ `lib-ver=<version>`). Extend the reported name with `driver_info:`, or disable with
31
+ `driver_info: false`. See the README "Client identification" section. (#1369)
32
+
33
+ ## Experimental
34
+
35
+ - Add `himport_prepare`, `himport_set`, `himport_discard` and `himport_discard_all`
36
+ (Redis 8.10 `HIMPORT`). Lost fieldsets are re-prepared and retried automatically; disable with
37
+ `himport_auto_prepare: false`. The API may change in a future minor release. See the README
38
+ "Bulk hash ingestion (HIMPORT)" section. (#1364)
39
+
40
+ ## Bug fixes
41
+
42
+ - Fix `FloatifyPairs` to not re-transform already transformed replies. (#1354)
43
+ - `unlink` now returns `0` for an empty keyset, consistent with `del`. (#1316)
44
+
45
+ ## Maintenance
46
+
47
+ - Pin `redis-client` to the exact version `0.30.1` (previously `>= 0.22.0`); includes the
48
+ reply-desynchronization fix from 0.26.4. (#1350, #1352)
49
+ - Maintainership change: `redis-rb` is now maintained by the Redis Ltd company.
50
+ - Run the test suite against prebuilt `redislabs/client-libs-test` Docker images; CI now covers
51
+ MRI 3.2/3.3/3.4/4.0 and TruffleRuby against Redis 7.2–8.10; JRuby removed. (#1317, #1318, #1344)
52
+ - Drop the unused `executables` config from the gemspec. (#1322)
53
+
54
+ # 5.4.1
55
+
56
+ - Properly handle NOSCRIPT errors.
57
+
58
+ # 5.4.0
59
+
60
+ - Fix `blmpop` method to actually use `BLMPOP`, it was mistakenly issuing `LMPOP` commands.
61
+ - `xadd` now accepts a `minid:` argument.
62
+ - `zrank` and `zrevrank` now accepts `with_score:` argument.
63
+ - `Redis#call` now accept a block, allowing to use `Redis` instances where `RedisClient` is expected.
64
+
65
+ # 5.3.0
66
+
67
+ - Fix the return type of `hgetall` when used inside a `multi` transaction which is itself inside a pipeline.
68
+
69
+ # 5.2.0
70
+
71
+ - Now require Ruby 2.6 because `redis-client` does.
72
+ - Eagerly close subscribed connection when using `subscribe_with_timeout`. See #1259.
73
+ - Add `exception` flag in `pipelined` allowing failed commands to be returned in the result array when set to `false`.
74
+
75
+ # 5.1.0
76
+
77
+ - `multi` now accept a `watch` keyword argument like `redis-client`. See #1236.
78
+ - `bitcount` and `bitpos` now accept a `scale:` argument on Redis 7+. See #1242
79
+ - Added `expiretime` and `pexpiretime`. See #1248.
80
+
81
+ # 5.0.8
82
+
83
+ - Fix `Redis#without_reconnect` for sentinel clients. Fix #1212.
84
+ - Add `sentinel_username`, `sentinel_password` for sentinel clients. Bump `redis-client` to `>=0.17.0`. See #1213
85
+
86
+ # 5.0.7
87
+
88
+ - Fix compatibility with `redis-client 0.15.0` when using Redis Sentinel. Fix #1209.
89
+
90
+ # 5.0.6
91
+
92
+ - Wait for an extra `config.read_timeout` in blocking commands rather than an arbitrary 100ms. See #1175.
93
+ - Treat ReadOnlyError as ConnectionError. See #1168.
94
+
95
+ # 5.0.5
96
+
97
+ - Fix automatic disconnection when the process was forked. See #1157.
98
+
99
+ # 5.0.4
100
+
101
+ - Cast `ttl` argument to integer in `expire`, `setex` and a few others.
102
+
103
+ # 5.0.3
104
+
105
+ - Add `OutOfMemoryError` as a subclass of `CommandError`
106
+
107
+ # 5.0.2
108
+
109
+ - Fix `Redis#close` to properly reset the fork protection check.
110
+
111
+ # 5.0.1
112
+
113
+ - Added a fake `Redis::Connections.drivers` method to be compatible with older sidekiq versions.
114
+
115
+ # 5.0.0
116
+
117
+ - Default client timeout decreased from 5 seconds to 1 second.
118
+ - Eagerly and strictly cast Integer and Float parameters.
119
+ - Allow to call `subscribe`, `unsubscribe`, `psubscribe` and `punsubscribe` from a subscribed client. See #1131.
120
+ - Use `MD5` for hashing server nodes in `Redis::Distributed`. This should improve keys distribution among servers. See #1089.
121
+ - Changed `sadd` and `srem` to now always return an Integer.
122
+ - Added `sadd?` and `srem?` which always return a Boolean.
123
+ - Added support for `IDLE` paramter in `xpending`.
124
+ - Cluster support has been moved to a `redis-clustering` companion gem.
125
+ - `select` no longer record the current database. If the client has to reconnect after `select` was used, it will reconnect to the original database.
126
+ - Better support Float timeout in blocking commands. See #977.
127
+ - `Redis.new` will now raise an error if provided unknown options.
128
+ - Removed positional timeout in blocking commands (`BLPOP`, etc). Timeout now must be passed as an option: `r.blpop("key", timeout: 2.5)`
129
+ - Removed `logger` option.
130
+ - Removed `reconnect_delay_max` and `reconnect_delay`, you can pass precise sleep durations to `reconnect_attempts` instead.
131
+ - Require Ruby 2.5+.
132
+ - Removed the deprecated `queue` and `commit` methods. Use `pipelined` instead.
133
+ - Removed the deprecated `Redis::Future#==`.
134
+ - Removed the deprecated `pipelined` and `multi` signature. Commands now MUST be called on the block argument, not the original redis instance.
135
+ - Removed `Redis.current`. You shouldn't assume there is a single global Redis connection, use a connection pool instead,
136
+ and libaries using Redis should accept a Redis instance (or connection pool) as a config. E.g. `MyLibrary.redis = Redis.new(...)`.
137
+ - Removed the `synchrony` driver.
138
+ - Removed `Redis.exists_returns_integer`, it's now always enabled.
2
139
 
3
140
  # 4.8.1
4
141