Skip to content
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
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ end.spec 'neo4j-ruby-driver' do
spec_extras[:platform] = 'java'
else
require_ruby_version '>= 3.1'
# async-io 1.x requires async 1.x (async 2 removed async/wrapper; LoadError otherwise)
dependency 'async', '~> 1.0'
dependency 'async-io', '>= 0'
dependency 'connection_pool', '>= 0'
dependency 'connection_pool', '>= 3.0'
end
end

Expand Down
4 changes: 2 additions & 2 deletions ruby/neo4j/driver/internal/async/pool/channel_pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ module Pool
class ChannelPool < ConnectionPool
def initialize(limit: nil, acquisition_timeout: nil, &block)
super(size: limit, timeout: acquisition_timeout, &block)
@available = TimedStack.new(@size, &block)
@available = TimedStack.new(size: @size, &block)
end

def acquire(options = {})
@available.pop(options[:timeout] || @timeout)
@available.pop(timeout: options[:timeout] || @timeout)
end

def release(resource)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def fresh_cluster_composition_fetched(composition_lookup_result)
@log.debug("Fetched cluster composition for database '#{@database_name.description}'. #{composition_lookup_result.cluster_composition}")
@routing_table.update(composition_lookup_result.cluster_composition)
@routing_table_registry.remove_aged
addresses_to_retain = @routing_table_registry.all_servers.map(&:unicast_stream).reduce(&:+)
addresses_to_retain = @routing_table_registry.all_servers.map(&:unicast_stream).reduce(Set.new, :+)

composition_lookup_result.resolved_initial_routers&.then do |addresses|
addresses_to_retain << addresses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def ensure_routing_table(context)
def all_servers
# obviously we just had a snapshot of all servers in all routing tables
# after we read it, the set could already be changed.
@routing_table_handlers.values.map(&:servers).reduce(&:+)
@routing_table_handlers.values.map(&:servers).reduce(Set.new, :+)
end

def remove(database_name)
Expand Down
2 changes: 1 addition & 1 deletion ruby/neo4j/driver/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Neo4j
module Driver
VERSION = '4.4.5'
VERSION = '4.4.6'
end
end