rails_failover 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 152daf08d747b0015a4dddd514ab1478c7fe56e7cfde31900ddbcc7132a32aa8
4
- data.tar.gz: 3d64f9b3bad32c9d941e6cd9439e91eab1f4ccc9f3277cd392821eb67d85d9fa
3
+ metadata.gz: 1586a787b6a0c7573a295515804a0342496cc1f8f9effe1d2e90d34004427dea
4
+ data.tar.gz: e1358cf8426ea5f6df3f8b039809d5062b18413f6950ecdea20d0379ae68bf5c
5
5
  SHA512:
6
- metadata.gz: 296bef2bacd7b7ae81f6d707faaaec9ff8fe0cbcd252fd3151e35fe3465d16841687e8c8ad151c1b7ea39f914fe7b95da3f5ced9677e5b2678af87f04bb22d73
7
- data.tar.gz: c6780fbf53a99acf790bd425d1856c8b3075ccb83433e577189ccdd674837d41f4b845294f0a822886e2141e37960c21ecde350a7100a0a59242ee714fd162e8
6
+ metadata.gz: d54c7fddc889d91a5f69505b04af146630a13038d3d4d1af05f3e19d083c9ff05fed3ff7e42c0ebe7f576c8e91d6880bdff8466b88990fb27488579a63de7df9
7
+ data.tar.gz: 88a4cc4c0c7848a0d1eef1ac1bb50d380df2c7bcc4a209fe7ea7733080c63fc929f4d5480e48c945713c2b5083efa967825b909da1ecf52bf414c5b9160d822d
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.6.3] - 2020-12-07
10
+
11
+ - FIX: Handle clients which are connecting during fallback
12
+
9
13
  ## [0.6.2] - 2020-11-19
10
14
 
11
15
  - FIX: Use concurrent-ruby maps to simplify concurrency logic. Resolves a number of possible concurrency issues
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_failover (0.6.2)
4
+ rails_failover (0.6.3)
5
5
  activerecord (~> 6.0)
6
6
  concurrent-ruby
7
7
  railties (~> 6.0)
@@ -55,6 +55,10 @@ module RailsFailover
55
55
 
56
56
  def check(client)
57
57
  Handler.instance.register_client(client)
58
+ expected_role = Handler.instance.primary_down?(@options) ? REPLICA : PRIMARY
59
+ if client.connection.rails_failover_role != expected_role
60
+ raise ::Redis::CannotConnectError, "Opened with unexpected failover role"
61
+ end
58
62
  end
59
63
 
60
64
  def on_disconnect(client)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsFailover
4
- VERSION = "0.6.2"
4
+ VERSION = "0.6.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_failover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alan Tan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-25 00:00:00.000000000 Z
11
+ date: 2020-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord