sequel-replica-failover 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f2d90a0ba53c617e157f44b92b0bfa4b64ca85a
4
- data.tar.gz: b5937e78dc147af34a8862c408ed6625eb55b616
3
+ metadata.gz: 184f9367a55260f7b22c13d31ee8bb3ee39d5ece
4
+ data.tar.gz: 2d5023b1cf3dff63cc77b08ead3b0dfc25277c33
5
5
  SHA512:
6
- metadata.gz: b6aeb1f7cb7a728fbcdf19f349dfbe22effe14da41dda582db65c572827cd6e63f02e82a324aff6180677ca3103c92fa126db0e8c6414c08d253b530d32b8fb6
7
- data.tar.gz: 678b93647e4001381bbaf101fa2683b2f09d1e27937fcdc6c391ae0638104fa4e2ffee0b81d82c2403fadc0be0513fc70053ae675cb35b5f26bbb3ff8d5cbc54
6
+ metadata.gz: c8a3edbdf975c3a2e6a99a19766dfb3cb1bd008207f8eb5f31eb71998de5ac01170a1fd941dab0b2e1499bb737396120f4db8f248ccb17c1c437550d5d80a167
7
+ data.tar.gz: 3d378d43a33d6babab0d587c334b8e003b1ceb59041168a927a3e9b4daf77082ad81a65a2ebea0de7483571e615ee88234ed556a40a8fecd7d85857510e36f71
@@ -20,8 +20,10 @@ class Sequel::ShardedSingleFailoverConnectionPool < Sequel::ShardedSingleConnect
20
20
  super(server, &block)
21
21
  rescue Sequel::DatabaseDisconnectError, Sequel::DatabaseConnectionError
22
22
  if server == :read_only && !@db.in_transaction?(server: :read_only)
23
- stick
24
23
  disconnect_server(server)
24
+ @conns[server] = nil
25
+
26
+ stick
25
27
 
26
28
  if @stuck_times >= @pool_retry_count
27
29
  raise
@@ -1,5 +1,5 @@
1
1
  module Sequel
2
2
  module ReplicaFailover
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-replica-failover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Henry