active_replicas 0.2.8 → 0.2.9

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: '09a494a1422b4168371ae516d05e6afa1c4f9814'
4
- data.tar.gz: 3d485d0a6de319a336997fb69738ce62437acff1
3
+ metadata.gz: 6fa17899b315dafa993da769a85b9f5bb65eebaf
4
+ data.tar.gz: 4ee06f7ff1ac6921359b85c4078d0bdf24e16ac0
5
5
  SHA512:
6
- metadata.gz: 8ef2a51477d2babfeeecf039f002b93c61834eb8474cb00357da1c83b16ce248373f9caabe92302991ca51ea6d874cc0c390e53f63d40740e51619bb250bd23e
7
- data.tar.gz: 25a10e0378a152b69e11c2d91e6cbd66a247ff364bc8dae8c69d44a64045be77fa97a5c0f0e99dfee1ab4fc6e08b5b3094363d55b0393bbfc2ac313b8b188703
6
+ metadata.gz: '0760082ac54858c53f2333dbd6428476961e14b35fd646abd88141c79955570c8488f56af7f2b767bcd5cccb33e4128b557675a745d9275fb79b42f67d4a7ec7'
7
+ data.tar.gz: 13bf22da6c145b8bf6d8afedd75ab78127339155a3c69e037b0bd2fff12aace6bfac257d04ebc5b91ab6c033725c5851545c6865ce4127f61ba71d84d5b33707
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- active_replicas (0.2.8)
4
+ active_replicas (0.2.9)
5
5
  concurrent-ruby (~> 1.0)
6
6
 
7
7
  GEM
@@ -21,9 +21,6 @@ module ActiveReplicas
21
21
  @primary_depth = 0
22
22
  # Current connection pool.
23
23
  @current_pool = nil
24
- # Thread-safe map of the connections from each pool. Cleared in tandem
25
- # with the connection pools.
26
- @connections = Concurrent::Map.new
27
24
 
28
25
  extend MonitorMixin
29
26
  end
@@ -46,16 +43,12 @@ module ActiveReplicas
46
43
  def connection
47
44
  pool = current_pool
48
45
 
49
- @connections[pool] || synchronize do
50
- @connections[pool] ||= begin
51
- conn = pool.connection
52
- return unless conn
46
+ conn = pool.connection
47
+ return unless conn
53
48
 
54
- ProxyingConnection.new connection: conn,
55
- is_primary: pool == @primary_pool,
56
- proxy: self
57
- end
58
- end
49
+ ProxyingConnection.new connection: conn,
50
+ is_primary: pool == @primary_pool,
51
+ proxy: self
59
52
  end
60
53
 
61
54
  def release_connection
@@ -64,7 +57,6 @@ module ActiveReplicas
64
57
 
65
58
  @primary_depth = 0
66
59
  @current_pool = nil
67
- @connections.clear
68
60
  end
69
61
  end
70
62
 
@@ -1,3 +1,3 @@
1
1
  module ActiveReplicas
2
- VERSION = "0.2.8"
2
+ VERSION = "0.2.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_replicas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dirk Gadsden