mongoid_orderable 6.0.0 → 6.0.1
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 +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/mongoid/orderable/engine.rb +7 -5
- data/lib/mongoid/orderable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 517614edc30dd44ac15d5eafcfcc9103bced1dd7ddd4cb0f3624edfe6adb6af2
|
4
|
+
data.tar.gz: 914eff039882840a25b888fe534a5adf3198c762a2944d141d425daff558baf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67ef0079e9c442579b08d6043fd80215e7678f705fea24b4581131b39880d1b0b33cc9fee4d8eb9ec1905e0b8b8ad2b4c79706ff170e0d49ec5c91130b91737a
|
7
|
+
data.tar.gz: c7c9befe3900fa468e6149fa0562de121525428b294981c6990d50e862f42912fa8a2b59a09e54e63328975b303af51de7c556a4b9a9632f0bbb9e4ed7d876b4
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,11 @@
|
|
1
|
-
### 6.0.
|
1
|
+
### 6.0.2 (Next)
|
2
2
|
|
3
3
|
* Your contribution here.
|
4
4
|
|
5
|
+
### 6.0.1 (2021/01/26)
|
6
|
+
|
7
|
+
* [#69](https://github.com/mongoid/mongoid_orderable/pull/69): Fix: Transactions should force read from primary - [@johnnyshields](https://github.com/johnnyshields).
|
8
|
+
|
5
9
|
### 6.0.0 (2021/01/23)
|
6
10
|
|
7
11
|
* [#65](https://github.com/mongoid/mongoid_orderable/pull/65): Feature: Add transaction support with lock table - [@johnnyshields](https://github.com/johnnyshields).
|
@@ -180,11 +180,13 @@ module Orderable
|
|
180
180
|
retries = transaction_max_retries
|
181
181
|
begin
|
182
182
|
doc.class.with_session(causal_consistency: true) do |session|
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
183
|
+
doc.class.with(read: { mode: :primary }) do
|
184
|
+
session.start_transaction(read: { mode: :primary },
|
185
|
+
read_concern: { level: 'majority' },
|
186
|
+
write_concern: { w: 'majority' })
|
187
|
+
yield
|
188
|
+
session.commit_transaction
|
189
|
+
end
|
188
190
|
end
|
189
191
|
rescue Mongo::Error::OperationFailure => e
|
190
192
|
sleep(0.001)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_orderable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pyromaniac
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|