instacart / makara

A Read-Write Proxy for Connections; Also provides an ActiveRecord adapter.
http://tech.taskrabbit.com/
MIT License
923 stars 170 forks source link

Fix arity bug with owner method inline with other pool overrides #387

Open ridiculous opened 5 months ago

ridiculous commented 5 months ago

Hey, this should fix kind of an obscure error coming from the connection wrapper when an error condition is met. For example, in my case, this error is thrown when there is a deadlock and the transaction is rolled back:

# ArgumentError
# wrong number of arguments (given 1, expected 0)
# gems/makara-0.5.1/lib/makara/connection_wrapper.rb:296 owner

Updates the owner method to conform to other methods in the abstract adapter, which generally ignore any arguments given, but all accept a splat of args.

In case it's helpful, I ran into this problem on Rails 6.1.7.3 using the latest published version of this gem 0.5.1