nobrainer 0.41.0 → 0.41.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 +6 -1
- data/lib/no_brainer/query_runner/table_on_demand.rb +7 -6
- 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: 5864cbae71a2eaa5c5f7efeb27d46c3a05f083618904641d793bef097b0b66d5
|
|
4
|
+
data.tar.gz: 1a905f02f1623ade41cc4fe2913dbfbdbcbb539a494a1df37d457b0b695d15df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8f3effc2a43c6f71f1eb0a42cd19d4ba6652599839998e746f9978a96aa8e3f9bc0b779e0524ac3315bc918cc06cd21399c8006d0f28f88c58d8a62008ab83c0
|
|
7
|
+
data.tar.gz: 2801dbe94a1268d752dd9844ecd79c56a34e5029797cf5414cabc9ec85189d8703ee1e3ab40d7645ffa260f6f09ba5cc58542d3fa769def2cfb25424312a3b6b
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
9
|
|
|
10
|
+
## [0.41.1] - 2022-03-21
|
|
11
|
+
### Fixed
|
|
12
|
+
- Removing table_config duplicates after a runtime exception (caspiano)
|
|
13
|
+
|
|
10
14
|
## [0.41.0] - 2021-10-17
|
|
11
15
|
### Added
|
|
12
16
|
- ActiveRecord `store_accessor` helper method
|
|
@@ -116,7 +120,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
116
120
|
- Locks: bug fix: allow small timeouts in lock()
|
|
117
121
|
- Fix reentrant lock counter on steals
|
|
118
122
|
|
|
119
|
-
[Unreleased]: https://github.com/nobrainerorm/nobrainer/compare/v0.41.
|
|
123
|
+
[Unreleased]: https://github.com/nobrainerorm/nobrainer/compare/v0.41.1...HEAD
|
|
124
|
+
[0.41.1]: https://github.com/nobrainerorm/nobrainer/compare/v0.41.0...v0.41.1
|
|
120
125
|
[0.41.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.40.0...v0.41.0
|
|
121
126
|
[0.40.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.36.0...v0.40.0
|
|
122
127
|
[0.36.0]: https://github.com/nobrainerorm/nobrainer/compare/v0.35.0...v0.36.0
|
|
@@ -29,9 +29,13 @@ class NoBrainer::QueryRunner::TableOnDemand < NoBrainer::QueryRunner::Middleware
|
|
|
29
29
|
env[:last_auto_create_table] = [db_name, table_name]
|
|
30
30
|
|
|
31
31
|
create_options = model.table_create_options
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
begin
|
|
33
|
+
NoBrainer.run(:db => db_name) do |r|
|
|
34
|
+
r.table_create(table_name, create_options.reject { |k,_| k.in? [:name, :write_acks] })
|
|
35
|
+
end
|
|
36
|
+
rescue RuntimeError => e
|
|
37
|
+
# We might have raced with another table create
|
|
38
|
+
raise unless e.message =~ /Table `#{db_name}\.#{table_name}` already exists/
|
|
35
39
|
end
|
|
36
40
|
|
|
37
41
|
# Prevent duplicate table errors on a cluster.
|
|
@@ -49,8 +53,5 @@ class NoBrainer::QueryRunner::TableOnDemand < NoBrainer::QueryRunner::Middleware
|
|
|
49
53
|
r.table(table_name).config().update(:write_acks => create_options[:write_acks])
|
|
50
54
|
end
|
|
51
55
|
end
|
|
52
|
-
rescue RuntimeError => e
|
|
53
|
-
# We might have raced with another table create
|
|
54
|
-
raise unless e.message =~ /Table `#{db_name}\.#{table_name}` already exists/
|
|
55
56
|
end
|
|
56
57
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nobrainer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.41.
|
|
4
|
+
version: 0.41.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicolas Viennot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-03-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|