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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee9d2adeb89553bf3e1bfdb3d98f1dabed5a9e4347bee756776081036a1d4341
4
- data.tar.gz: 9576cdbb916ee5b1ea82b722bb41a8144f46bbd4641620c41822c89be85bcf34
3
+ metadata.gz: d99c93a4972ec806a5152ec5f550c5bb6c6e40a42932359ca0093e03cd6f6404
4
+ data.tar.gz: 72b055252677077791916fa85bd3c12bc566c0acba36afcd218f8e4691efeaee
5
5
  SHA512:
6
- metadata.gz: 99ba847297a711cb7f1af1c05da9cf4222d00c3c89a91e4ba92b8e7eb5078275db448b46ce573b97e9fa03e40fd7cb69deac0987a43fc6be3dc3b53ea9779024
7
- data.tar.gz: 8755ce77dfad1fc86fdb17ce63a31aa5eb71fa8aba44a84eea3194c29d2df2045dfeab48d60137d9e1032ec1cfc42a66aef732c48ba005f38da4a687c084ec8a
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
- assign_node(command).public_send(method, *args, command, &block)
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
- assign_node(command).public_send(method, *args, command, &block)
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
- @node.call_all(method, command, args).first.then(&TSF.call(block))
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
- @node.call_primaries(method, command, args).first.then(&TSF.call(block))
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.call_primaries(method, command, args).first.then(&TSF.call(block))
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
- assign_node(command).public_send(method, *args, command, &block)
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-cluster-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.3
4
+ version: 0.17.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taishi Kasuga