Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't reconnect to send pipelined request no-op #983

Merged
merged 1 commit into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/dalli/pipelined_getter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def finish_queries(servers)
deleted = []

servers.each do |server|
next unless server.alive?
next unless server.connected?

begin
finish_query_for_server(server)
Expand Down
10 changes: 10 additions & 0 deletions test/integration/test_network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@
end
end

it 'handles timeout error during pipelined get' do
with_nil_logger do
memcached(p, 19_191) do |dc|
dc.send(:ring).server_for_key('abc').sock.stub(:write, proc { raise Timeout::Error }) do
assert_empty dc.get_multi(['abc'])
end
end
end
end

it 'handles asynchronous Thread#raise' do
with_nil_logger do
memcached(p, 19_191) do |dc|
Expand Down