redis-cluster-client 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/redis_client/cluster/key_slot_converter.rb +11 -0
- data/lib/redis_client/cluster/router.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75b8f7550c743c813f79d15ba60d5e78fe5e81c751854b5600cc1984b56256fa
|
4
|
+
data.tar.gz: c560f4fb9a3e5e044a64c8b8c0da8bf51413d384dd19d069994f14f44e4d4055
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5165edd2f2ae4c27680be76227cc73ed1b5e5c17914dc08eb6f9015199d29bb14f0c4961f5a291c3e764b78dfee3892e6666fff6aca95bc466eab144d4ce43d4
|
7
|
+
data.tar.gz: 91f09f17897dcd974f11001cd2ea0445a384cb83134d8b51835ad197835ee4710935253e024fd6c938f12fa10bb8daea56465ac7f522a6e2484ec25f942fcb0d
|
@@ -70,6 +70,17 @@ class RedisClient
|
|
70
70
|
|
71
71
|
key[s + 1..e - 1]
|
72
72
|
end
|
73
|
+
|
74
|
+
def hash_tag_included?(key)
|
75
|
+
key = key.to_s
|
76
|
+
s = key.index(LEFT_BRACKET)
|
77
|
+
return false if s.nil?
|
78
|
+
|
79
|
+
e = key.index(RIGHT_BRACKET, s + 1)
|
80
|
+
return false if e.nil?
|
81
|
+
|
82
|
+
s + 1 < e
|
83
|
+
end
|
73
84
|
end
|
74
85
|
end
|
75
86
|
end
|
@@ -336,7 +336,7 @@ class RedisClient
|
|
336
336
|
|
337
337
|
def send_multiple_keys_command(cmd, method, command, args, &block) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
338
338
|
key_step = @command.determine_key_step(cmd)
|
339
|
-
if command.size <= key_step + 1 ||
|
339
|
+
if command.size <= key_step + 1 || ::RedisClient::Cluster::KeySlotConverter.hash_tag_included?(command[1]) # rubocop:disable Style/IfUnlessModifier
|
340
340
|
return try_send(assign_node(command), method, command, args, &block)
|
341
341
|
end
|
342
342
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redis-cluster-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taishi Kasuga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis-client
|