Skip to content

Commit 7cafb29

Browse files
authored
Delete special handling of blocking command timeouts (#306)
2 parents 11d4b68 + 940be0c commit 7cafb29

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

lib/redis_client/cluster/router.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class RedisClient
1313
class Cluster
1414
class Router
1515
ZERO_CURSOR_FOR_SCAN = '0'
16-
METHODS_FOR_BLOCKING_CMD = %i[blocking_call_v blocking_call].freeze
1716
TSF = ->(f, x) { f.nil? ? x : f.call(x) }.curry
1817

1918
def initialize(config, concurrent_worker, pool: nil, **kwargs)
@@ -102,8 +101,6 @@ def try_send(node, method, command, args, retry_count: 3, &block) # rubocop:disa
102101
end
103102
raise
104103
rescue ::RedisClient::ConnectionError => e
105-
raise if METHODS_FOR_BLOCKING_CMD.include?(method) && e.is_a?(RedisClient::ReadTimeoutError)
106-
107104
update_cluster_info!
108105

109106
raise if retry_count <= 0

test/redis_client/test_cluster.rb

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -461,25 +461,6 @@ def test_compatibility_with_redis_gem
461461
assert_raises(NoMethodError) { @client.densaugeo('1m') }
462462
end
463463

464-
def test_circuit_breakers
465-
cli = ::RedisClient.cluster(
466-
nodes: TEST_NODE_URIS,
467-
fixed_hostname: TEST_FIXED_HOSTNAME,
468-
**TEST_GENERIC_OPTIONS.merge(
469-
circuit_breaker: {
470-
error_threshold: 1,
471-
error_timeout: 60,
472-
success_threshold: 10
473-
}
474-
)
475-
).new_client
476-
477-
assert_raises(::RedisClient::ReadTimeoutError) { cli.blocking_call(0.1, 'BRPOP', 'foo', 0) }
478-
assert_raises(::RedisClient::CircuitBreaker::OpenCircuitError) { cli.blocking_call(0.1, 'BRPOP', 'foo', 0) }
479-
480-
cli&.close
481-
end
482-
483464
private
484465

485466
def wait_for_replication

0 commit comments

Comments
 (0)