redis-cluster-client 0.17.3 → 0.17.4
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.
- checksums.yaml +4 -4
- data/lib/redis_client/cluster/router.rb +21 -7
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d99c93a4972ec806a5152ec5f550c5bb6c6e40a42932359ca0093e03cd6f6404
|
|
4
|
+
data.tar.gz: 72b055252677077791916fa85bd3c12bc566c0acba36afcd218f8e4691efeaee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e9d299dff3df85e3181d8a949e348985307d09d4ec2fa4d3de2795e11425ac2b988df0fecd1681af70974d6c315df3541d97aed53e449cc9839df252ce0a85d
|
|
7
|
+
data.tar.gz: 1f565bcc5c5e299b721309a1ba9273bc56016f4a62cf0a153cc4ecec4b7e355c4fc54488329537e1fe8733d09969ad34866d5998cfa6043667051dafc8d1884b
|
|
@@ -351,7 +351,8 @@ class RedisClient
|
|
|
351
351
|
elsif command[1].casecmp('purge').zero?
|
|
352
352
|
@node.call_all(method, command, args).first.then(&TSF.call(block))
|
|
353
353
|
else
|
|
354
|
-
|
|
354
|
+
# The other subcommands keep the default routing with the redirection handling.
|
|
355
|
+
send_command_by_spec(method, command, args, &block)
|
|
355
356
|
end
|
|
356
357
|
end
|
|
357
358
|
|
|
@@ -360,12 +361,15 @@ class RedisClient
|
|
|
360
361
|
@node.call_all(method, command, args, &block).flatten
|
|
361
362
|
elsif command[1].casecmp('pause').zero?
|
|
362
363
|
@node.call_all(method, command, args).first.then(&TSF.call(block))
|
|
364
|
+
elsif command[1].casecmp('unpause').zero?
|
|
365
|
+
@node.call_all(method, command, args).first.then(&TSF.call(block))
|
|
363
366
|
elsif command[1].casecmp('reply').zero?
|
|
364
367
|
@node.call_all(method, command, args).first.then(&TSF.call(block))
|
|
365
368
|
elsif command[1].casecmp('setname').zero?
|
|
366
369
|
@node.call_all(method, command, args).first.then(&TSF.call(block))
|
|
367
370
|
else
|
|
368
|
-
|
|
371
|
+
# The other subcommands keep the default routing with the command tips.
|
|
372
|
+
send_command_by_spec(method, command, args, &block)
|
|
369
373
|
end
|
|
370
374
|
end
|
|
371
375
|
|
|
@@ -376,8 +380,15 @@ class RedisClient
|
|
|
376
380
|
command[1].casecmp('slots').zero? ||
|
|
377
381
|
command[1].casecmp('shards').zero? ||
|
|
378
382
|
command[1].casecmp('count-failure-reports').zero? ||
|
|
379
|
-
command[1].casecmp('slaves').zero?
|
|
383
|
+
command[1].casecmp('slaves').zero? ||
|
|
384
|
+
command[1].casecmp('replicas').zero? ||
|
|
385
|
+
command[1].casecmp('myid').zero? ||
|
|
386
|
+
command[1].casecmp('myshardid').zero? ||
|
|
387
|
+
command[1].casecmp('links').zero?
|
|
380
388
|
assign_node(command).public_send(method, *args, command, &block)
|
|
389
|
+
elsif command[1].casecmp('slot-stats').zero?
|
|
390
|
+
# Each primary replies with the statistics of its own slots only.
|
|
391
|
+
@node.call_primaries(method, command, args).flatten(1).then(&TSF.call(block))
|
|
381
392
|
elsif command[1].casecmp('saveconfig').zero?
|
|
382
393
|
@node.call_all(method, command, args).first.then(&TSF.call(block))
|
|
383
394
|
elsif command[1].casecmp('countkeysinslot').zero? || command[1].casecmp('getkeysinslot').zero?
|
|
@@ -394,15 +405,18 @@ class RedisClient
|
|
|
394
405
|
if command[1].casecmp('debug').zero?
|
|
395
406
|
@node.call_all(method, command, args).first.then(&TSF.call(block))
|
|
396
407
|
elsif command[1].casecmp('kill').zero?
|
|
397
|
-
|
|
408
|
+
# The primaries without any running script reply with the NOTBUSY error.
|
|
409
|
+
@node.call_primaries_leniently(method, command, args).first.then(&TSF.call(block))
|
|
398
410
|
elsif command[1].casecmp('flush').zero?
|
|
399
|
-
|
|
411
|
+
# The redis 7.0 or later doesn't propagate the scripts to the replicas.
|
|
412
|
+
@node.call_all(method, command, args).first.then(&TSF.call(block))
|
|
400
413
|
elsif command[1].casecmp('load').zero?
|
|
401
|
-
@node.
|
|
414
|
+
@node.call_all(method, command, args).first.then(&TSF.call(block))
|
|
402
415
|
elsif command[1].casecmp('exists').zero?
|
|
403
416
|
@node.call_all(method, command, args).transpose.map { |arr| arr.any?(&:zero?) ? 0 : 1 }.then(&TSF.call(block))
|
|
404
417
|
else
|
|
405
|
-
|
|
418
|
+
# The other subcommands keep the default routing with the redirection handling.
|
|
419
|
+
send_command_by_spec(method, command, args, &block)
|
|
406
420
|
end
|
|
407
421
|
end
|
|
408
422
|
|