From 2e9960d3584cda8c831bf722de1e3b044b076fc9 Mon Sep 17 00:00:00 2001 From: "qi.wang" Date: Tue, 20 Aug 2019 17:24:06 +0900 Subject: [PATCH] use first shard as spec --- lib/active_record/turntable/connection_proxy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/active_record/turntable/connection_proxy.rb b/lib/active_record/turntable/connection_proxy.rb index ebf52853..20268e5f 100644 --- a/lib/active_record/turntable/connection_proxy.rb +++ b/lib/active_record/turntable/connection_proxy.rb @@ -237,7 +237,7 @@ def supports_views?(*args) end def spec - @spec ||= master.connection_pool.spec + @spec ||= shards.values.first.connection_pool.spec end end end