lhm-shopify 4.5.0 → 4.5.2
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/.github/workflows/test.yml +14 -6
- data/Appraisals +4 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +35 -35
- data/dev.yml +4 -3
- data/gemfiles/activerecord_7.2.gemfile.lock +3 -3
- data/gemfiles/activerecord_8.0.gemfile.lock +10 -6
- data/gemfiles/activerecord_8.1.gemfile +7 -0
- data/gemfiles/activerecord_8.1.gemfile.lock +96 -0
- data/gemfiles/activerecord_head.gemfile.lock +10 -6
- data/lhm.gemspec +2 -1
- data/lib/lhm/entangler.rb +1 -1
- data/lib/lhm/version.rb +1 -1
- data/spec/integration/lhm_spec.rb +13 -7
- data/spec/unit/entangler_spec.rb +14 -14
- metadata +363 -333
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb3462c079db4a571a7aa31320725c9cb44f965b49f28bd8fc44d91a82f267ee
|
|
4
|
+
data.tar.gz: d9d9a0219b384a307100e4176f0e5bd32da36eee336dc8caac8ba8efc69bac47
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ff5dc79dba6ffda90aa59d54734bece468ca2916a00d2056ec17f537471bdbf582bbd082ecaf765c886310593eda4484fa8ed9139567b66417592ee7c5fa6e5
|
|
7
|
+
data.tar.gz: e0cba363b3d461bf0f50b2229f9fe7065540838a6debf5d66d4eac824d32667c796bc9ed2310748015a9907befa305a07041476bf9ddaa60f9c46c012e7497e8
|
data/.github/workflows/test.yml
CHANGED
|
@@ -9,14 +9,15 @@ on:
|
|
|
9
9
|
jobs:
|
|
10
10
|
test:
|
|
11
11
|
name: Run tests
|
|
12
|
-
|
|
12
|
+
# ubuntu-26.04: trilogy fails to link -lcrypto with the Ruby 3.2 toolcache build
|
|
13
|
+
runs-on: ubuntu-24.04
|
|
13
14
|
|
|
14
15
|
strategy:
|
|
15
16
|
fail-fast: false
|
|
16
17
|
max-parallel: 8
|
|
17
18
|
matrix:
|
|
18
|
-
activerecord: ["7.2", "8.0", "head"]
|
|
19
|
-
ruby: ["3.1", "3.2", "3.3", "head"]
|
|
19
|
+
activerecord: ["7.2", "8.0", "8.1", "head"]
|
|
20
|
+
ruby: ["3.1", "3.2", "3.3", "3.4", "4.0", "head"]
|
|
20
21
|
mysql: ["5.7", "8.0"]
|
|
21
22
|
adapter: ["mysql2", "trilogy"]
|
|
22
23
|
exclude:
|
|
@@ -24,8 +25,13 @@ jobs:
|
|
|
24
25
|
ruby: head
|
|
25
26
|
- activerecord: 7.2
|
|
26
27
|
ruby: head
|
|
28
|
+
# activesupport 8.0 passes `quirks_mode:` to JSON.generate, which ruby-head's json rejects
|
|
29
|
+
- activerecord: 8.0
|
|
30
|
+
ruby: head
|
|
27
31
|
- activerecord: 8.0
|
|
28
32
|
ruby: 3.1
|
|
33
|
+
- activerecord: 8.1
|
|
34
|
+
ruby: 3.1
|
|
29
35
|
- activerecord: head
|
|
30
36
|
ruby: 3.1
|
|
31
37
|
|
|
@@ -35,14 +41,16 @@ jobs:
|
|
|
35
41
|
|
|
36
42
|
steps:
|
|
37
43
|
- uses: actions/checkout@v4
|
|
44
|
+
|
|
45
|
+
# Native gem extensions (mysql2, trilogy) are built during bundler-cache, so headers must exist first
|
|
46
|
+
- name: Install Ubuntu packages
|
|
47
|
+
run: sudo apt-get update && sudo apt-get install numactl libaio-dev libmysqlclient-dev libssl-dev
|
|
48
|
+
|
|
38
49
|
- uses: ruby/setup-ruby@v1
|
|
39
50
|
with:
|
|
40
51
|
ruby-version: ${{matrix.ruby}}
|
|
41
52
|
bundler-cache: true
|
|
42
53
|
|
|
43
|
-
- name: Install Ubuntu packages
|
|
44
|
-
run: sudo apt-get update && sudo apt-get install numactl libaio-dev libmysqlclient-dev
|
|
45
|
-
|
|
46
54
|
- name: Setup MySQL and ProxySQL (docker-compose)
|
|
47
55
|
# Might have to change to docker compose up -d (i.e. Compose V2) when the Ubuntu image changes the docker-compose version
|
|
48
56
|
run: docker compose -f docker-compose-mysql-${{ matrix.mysql }}.yml up -d
|
data/Appraisals
CHANGED
|
@@ -6,6 +6,10 @@ appraise "activerecord-8.0" do
|
|
|
6
6
|
gem "activerecord", "8.0.1"
|
|
7
7
|
end
|
|
8
8
|
|
|
9
|
+
appraise "activerecord-8.1" do
|
|
10
|
+
gem "activerecord", "8.1.4.1"
|
|
11
|
+
end
|
|
12
|
+
|
|
9
13
|
appraise "activerecord-head" do
|
|
10
14
|
gem "activerecord", git: "https://github.com/rails/rails.git", branch: "main"
|
|
11
15
|
end
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Unreleased
|
|
2
2
|
|
|
3
|
+
# 4.5.2 (Nov, 2026)
|
|
4
|
+
* Update test matrix to include Rails 8.1 and Ruby 3.4, 4.0
|
|
5
|
+
* Update development dependencies
|
|
6
|
+
|
|
7
|
+
# 4.5.1 (Jul, 2025)
|
|
8
|
+
* Create update before insert trigger
|
|
9
|
+
|
|
3
10
|
# 4.5.0 (Feb, 2025)
|
|
4
11
|
* Update test matrix to include Rails 8
|
|
5
12
|
* Add option to force tables to use default engine
|
data/Gemfile.lock
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
lhm-shopify (4.5.
|
|
4
|
+
lhm-shopify (4.5.2)
|
|
5
5
|
retriable (>= 3.0.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activemodel (8.
|
|
11
|
-
activesupport (= 8.
|
|
12
|
-
activerecord (8.
|
|
13
|
-
activemodel (= 8.
|
|
14
|
-
activesupport (= 8.
|
|
10
|
+
activemodel (8.1.4.1)
|
|
11
|
+
activesupport (= 8.1.4.1)
|
|
12
|
+
activerecord (8.1.4.1)
|
|
13
|
+
activemodel (= 8.1.4.1)
|
|
14
|
+
activesupport (= 8.1.4.1)
|
|
15
15
|
timeout (>= 0.4.0)
|
|
16
|
-
activesupport (8.
|
|
16
|
+
activesupport (8.1.4.1)
|
|
17
17
|
base64
|
|
18
|
-
benchmark (>= 0.3)
|
|
19
18
|
bigdecimal
|
|
20
19
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
21
20
|
connection_pool (>= 2.2.5)
|
|
22
21
|
drb
|
|
23
22
|
i18n (>= 1.6, < 2)
|
|
23
|
+
json
|
|
24
24
|
logger (>= 1.4.2)
|
|
25
25
|
minitest (>= 5.1)
|
|
26
26
|
securerandom (>= 0.3)
|
|
@@ -31,39 +31,39 @@ GEM
|
|
|
31
31
|
bundler
|
|
32
32
|
rake
|
|
33
33
|
thor (>= 0.14.0)
|
|
34
|
-
base64 (0.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
concurrent-ruby (1.3.
|
|
39
|
-
connection_pool (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
i18n (1.14.7)
|
|
34
|
+
base64 (0.3.0)
|
|
35
|
+
bigdecimal (4.1.3)
|
|
36
|
+
byebug (13.0.0)
|
|
37
|
+
reline (>= 0.6.0)
|
|
38
|
+
concurrent-ruby (1.3.8)
|
|
39
|
+
connection_pool (3.0.3)
|
|
40
|
+
drb (2.2.3)
|
|
41
|
+
i18n (1.15.2)
|
|
43
42
|
concurrent-ruby (~> 1.0)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
io-console (0.9.5)
|
|
44
|
+
json (3.1.0)
|
|
45
|
+
logger (1.7.0)
|
|
46
|
+
minitest (5.27.0)
|
|
47
|
+
mocha (3.1.0)
|
|
47
48
|
ruby2_keywords (>= 0.0.5)
|
|
48
|
-
mysql2 (0.5.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
mysql2 (0.5.7)
|
|
50
|
+
bigdecimal
|
|
51
|
+
ostruct (0.6.3)
|
|
52
|
+
rake (13.4.2)
|
|
53
|
+
reline (0.7.0)
|
|
54
|
+
io-console (~> 0.5)
|
|
55
|
+
retriable (5.0.1)
|
|
52
56
|
ruby2_keywords (0.0.5)
|
|
53
57
|
securerandom (0.4.1)
|
|
54
|
-
simplecov (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
simplecov_json_formatter (~> 0.1)
|
|
58
|
-
simplecov-html (0.12.3)
|
|
59
|
-
simplecov_json_formatter (0.1.4)
|
|
60
|
-
thor (1.3.2)
|
|
61
|
-
timeout (0.4.3)
|
|
58
|
+
simplecov (1.3.2)
|
|
59
|
+
thor (1.5.0)
|
|
60
|
+
timeout (0.6.1)
|
|
62
61
|
toxiproxy (2.0.2)
|
|
63
|
-
trilogy (2.
|
|
62
|
+
trilogy (2.13.3)
|
|
63
|
+
bigdecimal
|
|
64
64
|
tzinfo (2.0.6)
|
|
65
65
|
concurrent-ruby (~> 1.0)
|
|
66
|
-
uri (1.
|
|
66
|
+
uri (1.1.2)
|
|
67
67
|
|
|
68
68
|
PLATFORMS
|
|
69
69
|
arm64-darwin-21
|
|
@@ -79,7 +79,7 @@ DEPENDENCIES
|
|
|
79
79
|
byebug
|
|
80
80
|
lhm-shopify!
|
|
81
81
|
logger
|
|
82
|
-
minitest
|
|
82
|
+
minitest (~> 5.27)
|
|
83
83
|
mocha
|
|
84
84
|
mysql2
|
|
85
85
|
ostruct
|
data/dev.yml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
name: lhm
|
|
2
2
|
up:
|
|
3
3
|
- packages:
|
|
4
|
-
- mysql-client
|
|
4
|
+
- mysql-client
|
|
5
5
|
- wget
|
|
6
6
|
- ruby
|
|
7
7
|
- bundler
|
|
@@ -12,8 +12,9 @@ up:
|
|
|
12
12
|
meet: ":"
|
|
13
13
|
- custom:
|
|
14
14
|
name: Podman compose
|
|
15
|
-
met?: podman-compose ps | grep -
|
|
16
|
-
meet: podman-compose up -d
|
|
15
|
+
met?: "[[ $(podman-compose ps | grep -c -e 'running' -e 'Up') == 4 ]] 2> /dev/null"
|
|
16
|
+
meet: podman-compose -f docker-compose-mysql-8.0.yml up -d
|
|
17
|
+
down: podman-compose down
|
|
17
18
|
- custom:
|
|
18
19
|
name: Waiting for DBs to be operational
|
|
19
20
|
met?: ./scripts/helpers/wait-for-dbs.sh
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
lhm-shopify (4.5.
|
|
4
|
+
lhm-shopify (4.5.2)
|
|
5
5
|
retriable (>= 3.0.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -41,7 +41,7 @@ GEM
|
|
|
41
41
|
i18n (1.14.7)
|
|
42
42
|
concurrent-ruby (~> 1.0)
|
|
43
43
|
logger (1.6.5)
|
|
44
|
-
minitest (5.
|
|
44
|
+
minitest (5.27.0)
|
|
45
45
|
mocha (2.1.0)
|
|
46
46
|
ruby2_keywords (>= 0.0.5)
|
|
47
47
|
mysql2 (0.5.5)
|
|
@@ -77,7 +77,7 @@ DEPENDENCIES
|
|
|
77
77
|
byebug
|
|
78
78
|
lhm-shopify!
|
|
79
79
|
logger
|
|
80
|
-
minitest
|
|
80
|
+
minitest (~> 5.27)
|
|
81
81
|
mocha
|
|
82
82
|
mysql2
|
|
83
83
|
ostruct
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: ..
|
|
3
3
|
specs:
|
|
4
|
-
lhm-shopify (4.5.
|
|
4
|
+
lhm-shopify (4.5.2)
|
|
5
5
|
retriable (>= 3.0.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -34,20 +34,24 @@ GEM
|
|
|
34
34
|
base64 (0.2.0)
|
|
35
35
|
benchmark (0.4.0)
|
|
36
36
|
bigdecimal (3.1.9)
|
|
37
|
-
byebug (
|
|
37
|
+
byebug (13.0.0)
|
|
38
|
+
reline (>= 0.6.0)
|
|
38
39
|
concurrent-ruby (1.3.5)
|
|
39
40
|
connection_pool (2.5.0)
|
|
40
41
|
docile (1.4.0)
|
|
41
|
-
drb (2.2.
|
|
42
|
+
drb (2.2.3)
|
|
42
43
|
i18n (1.14.1)
|
|
43
44
|
concurrent-ruby (~> 1.0)
|
|
45
|
+
io-console (0.9.5)
|
|
44
46
|
logger (1.6.1)
|
|
45
|
-
minitest (5.
|
|
47
|
+
minitest (5.27.0)
|
|
46
48
|
mocha (2.1.0)
|
|
47
49
|
ruby2_keywords (>= 0.0.5)
|
|
48
50
|
mysql2 (0.5.5)
|
|
49
51
|
ostruct (0.6.1)
|
|
50
52
|
rake (13.0.6)
|
|
53
|
+
reline (0.7.0)
|
|
54
|
+
io-console (~> 0.5)
|
|
51
55
|
retriable (3.1.2)
|
|
52
56
|
ruby2_keywords (0.0.5)
|
|
53
57
|
securerandom (0.4.1)
|
|
@@ -79,7 +83,7 @@ DEPENDENCIES
|
|
|
79
83
|
byebug
|
|
80
84
|
lhm-shopify!
|
|
81
85
|
logger
|
|
82
|
-
minitest
|
|
86
|
+
minitest (~> 5.27)
|
|
83
87
|
mocha
|
|
84
88
|
mysql2
|
|
85
89
|
ostruct
|
|
@@ -89,4 +93,4 @@ DEPENDENCIES
|
|
|
89
93
|
trilogy
|
|
90
94
|
|
|
91
95
|
BUNDLED WITH
|
|
92
|
-
|
|
96
|
+
4.0.24
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: ..
|
|
3
|
+
specs:
|
|
4
|
+
lhm-shopify (4.5.2)
|
|
5
|
+
retriable (>= 3.0.0)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
activemodel (8.1.4.1)
|
|
11
|
+
activesupport (= 8.1.4.1)
|
|
12
|
+
activerecord (8.1.4.1)
|
|
13
|
+
activemodel (= 8.1.4.1)
|
|
14
|
+
activesupport (= 8.1.4.1)
|
|
15
|
+
timeout (>= 0.4.0)
|
|
16
|
+
activesupport (8.1.4.1)
|
|
17
|
+
base64
|
|
18
|
+
bigdecimal
|
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
20
|
+
connection_pool (>= 2.2.5)
|
|
21
|
+
drb
|
|
22
|
+
i18n (>= 1.6, < 2)
|
|
23
|
+
json
|
|
24
|
+
logger (>= 1.4.2)
|
|
25
|
+
minitest (>= 5.1)
|
|
26
|
+
securerandom (>= 0.3)
|
|
27
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
28
|
+
uri (>= 0.13.1)
|
|
29
|
+
after_do (0.4.0)
|
|
30
|
+
appraisal (2.5.0)
|
|
31
|
+
bundler
|
|
32
|
+
rake
|
|
33
|
+
thor (>= 0.14.0)
|
|
34
|
+
base64 (0.3.0)
|
|
35
|
+
bigdecimal (4.1.3)
|
|
36
|
+
byebug (13.0.0)
|
|
37
|
+
reline (>= 0.6.0)
|
|
38
|
+
concurrent-ruby (1.3.8)
|
|
39
|
+
connection_pool (3.0.3)
|
|
40
|
+
docile (1.4.0)
|
|
41
|
+
drb (2.2.3)
|
|
42
|
+
i18n (1.15.2)
|
|
43
|
+
concurrent-ruby (~> 1.0)
|
|
44
|
+
io-console (0.9.5)
|
|
45
|
+
json (3.1.0)
|
|
46
|
+
logger (1.7.0)
|
|
47
|
+
minitest (5.27.0)
|
|
48
|
+
mocha (2.1.0)
|
|
49
|
+
ruby2_keywords (>= 0.0.5)
|
|
50
|
+
mysql2 (0.5.5)
|
|
51
|
+
ostruct (0.6.1)
|
|
52
|
+
rake (13.0.6)
|
|
53
|
+
reline (0.7.0)
|
|
54
|
+
io-console (~> 0.5)
|
|
55
|
+
retriable (3.1.2)
|
|
56
|
+
ruby2_keywords (0.0.5)
|
|
57
|
+
securerandom (0.4.1)
|
|
58
|
+
simplecov (0.22.0)
|
|
59
|
+
docile (~> 1.1)
|
|
60
|
+
simplecov-html (~> 0.11)
|
|
61
|
+
simplecov_json_formatter (~> 0.1)
|
|
62
|
+
simplecov-html (0.12.3)
|
|
63
|
+
simplecov_json_formatter (0.1.4)
|
|
64
|
+
thor (1.3.2)
|
|
65
|
+
timeout (0.6.1)
|
|
66
|
+
toxiproxy (2.0.2)
|
|
67
|
+
trilogy (2.9.0)
|
|
68
|
+
tzinfo (2.0.6)
|
|
69
|
+
concurrent-ruby (~> 1.0)
|
|
70
|
+
uri (1.1.2)
|
|
71
|
+
|
|
72
|
+
PLATFORMS
|
|
73
|
+
arm64-darwin-21
|
|
74
|
+
arm64-darwin-22
|
|
75
|
+
arm64-darwin-23
|
|
76
|
+
x86_64-darwin-20
|
|
77
|
+
x86_64-linux
|
|
78
|
+
|
|
79
|
+
DEPENDENCIES
|
|
80
|
+
activerecord (= 8.1.4.1)
|
|
81
|
+
after_do
|
|
82
|
+
appraisal
|
|
83
|
+
byebug
|
|
84
|
+
lhm-shopify!
|
|
85
|
+
logger
|
|
86
|
+
minitest (~> 5.27)
|
|
87
|
+
mocha
|
|
88
|
+
mysql2
|
|
89
|
+
ostruct
|
|
90
|
+
rake
|
|
91
|
+
simplecov
|
|
92
|
+
toxiproxy
|
|
93
|
+
trilogy
|
|
94
|
+
|
|
95
|
+
BUNDLED WITH
|
|
96
|
+
4.0.24
|
|
@@ -26,7 +26,7 @@ GIT
|
|
|
26
26
|
PATH
|
|
27
27
|
remote: ..
|
|
28
28
|
specs:
|
|
29
|
-
lhm-shopify (4.5.
|
|
29
|
+
lhm-shopify (4.5.2)
|
|
30
30
|
retriable (>= 3.0.0)
|
|
31
31
|
|
|
32
32
|
GEM
|
|
@@ -40,20 +40,24 @@ GEM
|
|
|
40
40
|
base64 (0.2.0)
|
|
41
41
|
benchmark (0.4.0)
|
|
42
42
|
bigdecimal (3.1.9)
|
|
43
|
-
byebug (
|
|
43
|
+
byebug (13.0.0)
|
|
44
|
+
reline (>= 0.6.0)
|
|
44
45
|
concurrent-ruby (1.3.5)
|
|
45
46
|
connection_pool (2.5.0)
|
|
46
47
|
docile (1.4.1)
|
|
47
|
-
drb (2.2.
|
|
48
|
+
drb (2.2.3)
|
|
48
49
|
i18n (1.14.7)
|
|
49
50
|
concurrent-ruby (~> 1.0)
|
|
51
|
+
io-console (0.9.5)
|
|
50
52
|
logger (1.6.5)
|
|
51
|
-
minitest (5.
|
|
53
|
+
minitest (5.27.0)
|
|
52
54
|
mocha (2.4.5)
|
|
53
55
|
ruby2_keywords (>= 0.0.5)
|
|
54
56
|
mysql2 (0.5.6)
|
|
55
57
|
ostruct (0.6.1)
|
|
56
58
|
rake (13.2.1)
|
|
59
|
+
reline (0.7.0)
|
|
60
|
+
io-console (~> 0.5)
|
|
57
61
|
retriable (3.1.2)
|
|
58
62
|
ruby2_keywords (0.0.5)
|
|
59
63
|
securerandom (0.4.1)
|
|
@@ -83,7 +87,7 @@ DEPENDENCIES
|
|
|
83
87
|
byebug
|
|
84
88
|
lhm-shopify!
|
|
85
89
|
logger
|
|
86
|
-
minitest
|
|
90
|
+
minitest (~> 5.27)
|
|
87
91
|
mocha
|
|
88
92
|
mysql2
|
|
89
93
|
ostruct
|
|
@@ -93,4 +97,4 @@ DEPENDENCIES
|
|
|
93
97
|
trilogy
|
|
94
98
|
|
|
95
99
|
BUNDLED WITH
|
|
96
|
-
|
|
100
|
+
4.0.24
|
data/lhm.gemspec
CHANGED
|
@@ -26,7 +26,8 @@ Gem::Specification.new do |s|
|
|
|
26
26
|
s.add_dependency 'retriable', '>= 3.0.0'
|
|
27
27
|
|
|
28
28
|
s.add_development_dependency 'activerecord'
|
|
29
|
-
|
|
29
|
+
# minitest 6 depends on prism, whose native gems need Ruby >= 3.3 and < head; 5.27 covers Ruby 3.1 through 4.x
|
|
30
|
+
s.add_development_dependency 'minitest', '~> 5.27'
|
|
30
31
|
s.add_development_dependency 'mocha'
|
|
31
32
|
s.add_development_dependency 'after_do'
|
|
32
33
|
s.add_development_dependency 'rake'
|
data/lib/lhm/entangler.rb
CHANGED
data/lib/lhm/version.rb
CHANGED
|
@@ -669,10 +669,14 @@ describe Lhm do
|
|
|
669
669
|
it 'should perserve deletes during migration' do
|
|
670
670
|
50.times { |n| execute("insert into users set reference = '#{ n }'") }
|
|
671
671
|
|
|
672
|
+
# Use a separate pooled connection: sharing @connection with the migration interleaves
|
|
673
|
+
# protocol packets on one socket if this thread outlives the sleep below.
|
|
672
674
|
delete = Thread.new do
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
675
|
+
ActiveRecord::Base.connection_pool.with_connection do |conn|
|
|
676
|
+
10.times do |n|
|
|
677
|
+
conn.execute("delete from users where reference = '#{ n }'")
|
|
678
|
+
sleep(0.17)
|
|
679
|
+
end
|
|
676
680
|
end
|
|
677
681
|
end
|
|
678
682
|
sleep 2
|
|
@@ -729,17 +733,19 @@ describe Lhm do
|
|
|
729
733
|
table_create(:users)
|
|
730
734
|
100.times { |n| execute("insert into users set reference = '#{ n }'") }
|
|
731
735
|
|
|
732
|
-
# Redeclare Lhm::ChunkInsert to use Hook to disable MySQL writer for 3 seconds before first insert
|
|
736
|
+
# Redeclare Lhm::ChunkInsert to use Hook to disable MySQL writer for 3 seconds before first insert.
|
|
737
|
+
# The proxy is disabled synchronously so the insert always hits the outage; disabling it from the
|
|
738
|
+
# background thread races with the insert and can push the outage onto non-retried queries.
|
|
733
739
|
Lhm::ChunkInsert.class_eval do
|
|
734
740
|
extend AfterDo
|
|
735
741
|
|
|
736
742
|
before(:insert_and_return_count_of_rows_created) do
|
|
737
743
|
unless mysql_disabled
|
|
738
744
|
mysql_disabled = true
|
|
745
|
+
Toxiproxy[:mysql_master].disable
|
|
739
746
|
Thread.new do
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
end
|
|
747
|
+
sleep 3
|
|
748
|
+
Toxiproxy[:mysql_master].enable
|
|
743
749
|
end
|
|
744
750
|
end
|
|
745
751
|
end
|
data/spec/unit/entangler_spec.rb
CHANGED
|
@@ -27,18 +27,18 @@ describe Lhm::Entangler do
|
|
|
27
27
|
@destination.columns['tags'] = { :type => 'varchar(255)' }
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
it 'should create
|
|
30
|
+
it 'should create the delete trigger to the destination table first' do
|
|
31
31
|
ddl = %Q{
|
|
32
|
-
create trigger `
|
|
33
|
-
after
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
create trigger `lhmt_del_origin`
|
|
33
|
+
after delete on `origin` for each row
|
|
34
|
+
delete ignore from `destination` /* large hadron migration */
|
|
35
|
+
where `destination`.`id` = OLD.`id`
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
assert_equal strip(ddl), @entangler.entangle[0]
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
-
it 'should create
|
|
41
|
+
it 'should create the update trigger to the destination table second' do
|
|
42
42
|
ddl = %Q{
|
|
43
43
|
create trigger `lhmt_upd_origin`
|
|
44
44
|
after update on `origin` for each row
|
|
@@ -46,18 +46,18 @@ describe Lhm::Entangler do
|
|
|
46
46
|
values (`NEW`.`info`, `NEW`.`tags`)
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
assert_equal strip(ddl), @entangler.entangle[1]
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
-
it 'should create
|
|
52
|
+
it 'should create the insert trigger to destination table last' do
|
|
53
53
|
ddl = %Q{
|
|
54
|
-
create trigger `
|
|
55
|
-
after
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
create trigger `lhmt_ins_origin`
|
|
55
|
+
after insert on `origin` for each row
|
|
56
|
+
replace into `destination` (`info`, `tags`) /* large hadron migration */
|
|
57
|
+
values (`NEW`.`info`, `NEW`.`tags`)
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
assert_equal strip(ddl), @entangler.entangle[2]
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
it 'should retry trigger creation when it hits a lock wait timeout' do
|
metadata
CHANGED
|
@@ -1,358 +1,388 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lhm-shopify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.5.
|
|
4
|
+
version: 4.5.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- SoundCloud
|
|
8
|
-
- Shopify
|
|
9
|
-
- Rany Keddo
|
|
10
|
-
- Tobias Bielohlawek
|
|
11
|
-
- Tobias Schmidt
|
|
7
|
+
- SoundCloud
|
|
8
|
+
- Shopify
|
|
9
|
+
- Rany Keddo
|
|
10
|
+
- Tobias Bielohlawek
|
|
11
|
+
- Tobias Schmidt
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
|
-
- !ruby/object:Gem::Dependency
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- !ruby/object:Gem::
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
- !ruby/object:Gem::
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
- !ruby/object:Gem::Dependency
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
- !ruby/object:Gem::
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
- !ruby/object:Gem::
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
16
|
+
- !ruby/object:Gem::Dependency
|
|
17
|
+
name: retriable
|
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
|
19
|
+
requirements:
|
|
20
|
+
-
|
|
21
|
+
- ">="
|
|
22
|
+
- !ruby/object:Gem::Version
|
|
23
|
+
version: 3.0.0
|
|
24
|
+
type: :runtime
|
|
25
|
+
prerelease: false
|
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
27
|
+
requirements:
|
|
28
|
+
-
|
|
29
|
+
- ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 3.0.0
|
|
32
|
+
- !ruby/object:Gem::Dependency
|
|
33
|
+
name: activerecord
|
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
-
|
|
37
|
+
- ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: "0"
|
|
40
|
+
type: :development
|
|
41
|
+
prerelease: false
|
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
-
|
|
45
|
+
- ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: "0"
|
|
48
|
+
- !ruby/object:Gem::Dependency
|
|
49
|
+
name: minitest
|
|
50
|
+
requirement: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
-
|
|
53
|
+
- ~>
|
|
54
|
+
- !ruby/object:Gem::Version
|
|
55
|
+
version: "5.27"
|
|
56
|
+
type: :development
|
|
57
|
+
prerelease: false
|
|
58
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
59
|
+
requirements:
|
|
60
|
+
-
|
|
61
|
+
- ~>
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: "5.27"
|
|
64
|
+
- !ruby/object:Gem::Dependency
|
|
65
|
+
name: mocha
|
|
66
|
+
requirement: !ruby/object:Gem::Requirement
|
|
67
|
+
requirements:
|
|
68
|
+
-
|
|
69
|
+
- ">="
|
|
70
|
+
- !ruby/object:Gem::Version
|
|
71
|
+
version: "0"
|
|
72
|
+
type: :development
|
|
73
|
+
prerelease: false
|
|
74
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
75
|
+
requirements:
|
|
76
|
+
-
|
|
77
|
+
- ">="
|
|
78
|
+
- !ruby/object:Gem::Version
|
|
79
|
+
version: "0"
|
|
80
|
+
- !ruby/object:Gem::Dependency
|
|
81
|
+
name: after_do
|
|
82
|
+
requirement: !ruby/object:Gem::Requirement
|
|
83
|
+
requirements:
|
|
84
|
+
-
|
|
85
|
+
- ">="
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: "0"
|
|
88
|
+
type: :development
|
|
89
|
+
prerelease: false
|
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
-
|
|
93
|
+
- ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: "0"
|
|
96
|
+
- !ruby/object:Gem::Dependency
|
|
97
|
+
name: rake
|
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
-
|
|
101
|
+
- ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: "0"
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
-
|
|
109
|
+
- ">="
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: "0"
|
|
112
|
+
- !ruby/object:Gem::Dependency
|
|
113
|
+
name: mysql2
|
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
|
115
|
+
requirements:
|
|
116
|
+
-
|
|
117
|
+
- ">="
|
|
118
|
+
- !ruby/object:Gem::Version
|
|
119
|
+
version: "0"
|
|
120
|
+
type: :development
|
|
121
|
+
prerelease: false
|
|
122
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
123
|
+
requirements:
|
|
124
|
+
-
|
|
125
|
+
- ">="
|
|
126
|
+
- !ruby/object:Gem::Version
|
|
127
|
+
version: "0"
|
|
128
|
+
- !ruby/object:Gem::Dependency
|
|
129
|
+
name: trilogy
|
|
130
|
+
requirement: !ruby/object:Gem::Requirement
|
|
131
|
+
requirements:
|
|
132
|
+
-
|
|
133
|
+
- ">="
|
|
134
|
+
- !ruby/object:Gem::Version
|
|
135
|
+
version: "0"
|
|
136
|
+
type: :development
|
|
137
|
+
prerelease: false
|
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
139
|
+
requirements:
|
|
140
|
+
-
|
|
141
|
+
- ">="
|
|
142
|
+
- !ruby/object:Gem::Version
|
|
143
|
+
version: "0"
|
|
144
|
+
- !ruby/object:Gem::Dependency
|
|
145
|
+
name: simplecov
|
|
146
|
+
requirement: !ruby/object:Gem::Requirement
|
|
147
|
+
requirements:
|
|
148
|
+
-
|
|
149
|
+
- ">="
|
|
150
|
+
- !ruby/object:Gem::Version
|
|
151
|
+
version: "0"
|
|
152
|
+
type: :development
|
|
153
|
+
prerelease: false
|
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
155
|
+
requirements:
|
|
156
|
+
-
|
|
157
|
+
- ">="
|
|
158
|
+
- !ruby/object:Gem::Version
|
|
159
|
+
version: "0"
|
|
160
|
+
- !ruby/object:Gem::Dependency
|
|
161
|
+
name: toxiproxy
|
|
162
|
+
requirement: !ruby/object:Gem::Requirement
|
|
163
|
+
requirements:
|
|
164
|
+
-
|
|
165
|
+
- ">="
|
|
166
|
+
- !ruby/object:Gem::Version
|
|
167
|
+
version: "0"
|
|
168
|
+
type: :development
|
|
169
|
+
prerelease: false
|
|
170
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
171
|
+
requirements:
|
|
172
|
+
-
|
|
173
|
+
- ">="
|
|
174
|
+
- !ruby/object:Gem::Version
|
|
175
|
+
version: "0"
|
|
176
|
+
- !ruby/object:Gem::Dependency
|
|
177
|
+
name: appraisal
|
|
178
|
+
requirement: !ruby/object:Gem::Requirement
|
|
179
|
+
requirements:
|
|
180
|
+
-
|
|
181
|
+
- ">="
|
|
182
|
+
- !ruby/object:Gem::Version
|
|
183
|
+
version: "0"
|
|
184
|
+
type: :development
|
|
185
|
+
prerelease: false
|
|
186
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
187
|
+
requirements:
|
|
188
|
+
-
|
|
189
|
+
- ">="
|
|
190
|
+
- !ruby/object:Gem::Version
|
|
191
|
+
version: "0"
|
|
192
|
+
- !ruby/object:Gem::Dependency
|
|
193
|
+
name: byebug
|
|
194
|
+
requirement: !ruby/object:Gem::Requirement
|
|
195
|
+
requirements:
|
|
196
|
+
-
|
|
197
|
+
- ">="
|
|
198
|
+
- !ruby/object:Gem::Version
|
|
199
|
+
version: "0"
|
|
200
|
+
type: :development
|
|
201
|
+
prerelease: false
|
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
203
|
+
requirements:
|
|
204
|
+
-
|
|
205
|
+
- ">="
|
|
206
|
+
- !ruby/object:Gem::Version
|
|
207
|
+
version: "0"
|
|
208
|
+
- !ruby/object:Gem::Dependency
|
|
209
|
+
name: ostruct
|
|
210
|
+
requirement: !ruby/object:Gem::Requirement
|
|
211
|
+
requirements:
|
|
212
|
+
-
|
|
213
|
+
- ">="
|
|
214
|
+
- !ruby/object:Gem::Version
|
|
215
|
+
version: "0"
|
|
216
|
+
type: :development
|
|
217
|
+
prerelease: false
|
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
219
|
+
requirements:
|
|
220
|
+
-
|
|
221
|
+
- ">="
|
|
222
|
+
- !ruby/object:Gem::Version
|
|
223
|
+
version: "0"
|
|
224
|
+
- !ruby/object:Gem::Dependency
|
|
225
|
+
name: logger
|
|
226
|
+
requirement: !ruby/object:Gem::Requirement
|
|
227
|
+
requirements:
|
|
228
|
+
-
|
|
229
|
+
- ">="
|
|
230
|
+
- !ruby/object:Gem::Version
|
|
231
|
+
version: "0"
|
|
232
|
+
type: :development
|
|
233
|
+
prerelease: false
|
|
234
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
235
|
+
requirements:
|
|
236
|
+
-
|
|
237
|
+
- ">="
|
|
238
|
+
- !ruby/object:Gem::Version
|
|
239
|
+
version: "0"
|
|
240
|
+
description: "Migrate large tables without downtime by copying to a temporary table in chunks. The old table is not dropped. Instead, it is moved to timestamp_table_name for verification."
|
|
215
241
|
email: database-engineering@shopify.com
|
|
216
242
|
executables: []
|
|
217
243
|
extensions: []
|
|
218
244
|
extra_rdoc_files: []
|
|
219
245
|
files:
|
|
220
|
-
-
|
|
221
|
-
-
|
|
222
|
-
-
|
|
223
|
-
-
|
|
224
|
-
-
|
|
225
|
-
- Appraisals
|
|
226
|
-
- CHANGELOG.md
|
|
227
|
-
- Gemfile
|
|
228
|
-
- Gemfile.lock
|
|
229
|
-
- LICENSE
|
|
230
|
-
- README.md
|
|
231
|
-
- Rakefile
|
|
232
|
-
- dev.yml
|
|
233
|
-
- docker-compose-mysql-5.7.yml
|
|
234
|
-
- docker-compose-mysql-8.0.yml
|
|
235
|
-
- docker-compose.yml
|
|
236
|
-
- gemfiles/activerecord_7.2.gemfile
|
|
237
|
-
- gemfiles/activerecord_7.2.gemfile.lock
|
|
238
|
-
- gemfiles/activerecord_8.0.gemfile
|
|
239
|
-
- gemfiles/activerecord_8.0.gemfile.lock
|
|
240
|
-
- gemfiles/
|
|
241
|
-
- gemfiles/
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
-
|
|
245
|
-
- lib/lhm
|
|
246
|
-
- lib/lhm
|
|
247
|
-
- lib/lhm/
|
|
248
|
-
- lib/lhm/
|
|
249
|
-
- lib/lhm/
|
|
250
|
-
- lib/lhm/
|
|
251
|
-
- lib/lhm/
|
|
252
|
-
- lib/lhm/
|
|
253
|
-
- lib/lhm/
|
|
254
|
-
- lib/lhm/
|
|
255
|
-
- lib/lhm/
|
|
256
|
-
- lib/lhm/
|
|
257
|
-
- lib/lhm/
|
|
258
|
-
- lib/lhm/
|
|
259
|
-
- lib/lhm/
|
|
260
|
-
- lib/lhm/
|
|
261
|
-
- lib/lhm/
|
|
262
|
-
- lib/lhm/
|
|
263
|
-
- lib/lhm/
|
|
264
|
-
- lib/lhm/
|
|
265
|
-
- lib/lhm/
|
|
266
|
-
- lib/lhm/
|
|
267
|
-
- lib/lhm/
|
|
268
|
-
- lib/lhm/throttler
|
|
269
|
-
- lib/lhm/throttler/
|
|
270
|
-
- lib/lhm/throttler/
|
|
271
|
-
- lib/lhm/throttler/
|
|
272
|
-
- lib/lhm/
|
|
273
|
-
- lib/lhm/
|
|
274
|
-
-
|
|
275
|
-
-
|
|
276
|
-
- scripts/
|
|
277
|
-
- scripts/mysql/
|
|
278
|
-
- scripts/
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
- spec
|
|
283
|
-
- spec/
|
|
284
|
-
- spec/fixtures/
|
|
285
|
-
- spec/fixtures/
|
|
286
|
-
- spec/fixtures/
|
|
287
|
-
- spec/fixtures/
|
|
288
|
-
- spec/fixtures/
|
|
289
|
-
- spec/fixtures/
|
|
290
|
-
- spec/fixtures/
|
|
291
|
-
- spec/fixtures/
|
|
292
|
-
- spec/fixtures/
|
|
293
|
-
- spec/fixtures/
|
|
294
|
-
- spec/fixtures/
|
|
295
|
-
- spec/fixtures/
|
|
296
|
-
- spec/fixtures/
|
|
297
|
-
- spec/fixtures/
|
|
298
|
-
- spec/
|
|
299
|
-
- spec/
|
|
300
|
-
- spec/integration/
|
|
301
|
-
- spec/integration/
|
|
302
|
-
- spec/integration/
|
|
303
|
-
- spec/integration/
|
|
304
|
-
- spec/integration/
|
|
305
|
-
- spec/integration/
|
|
306
|
-
- spec/integration/
|
|
307
|
-
- spec/integration/
|
|
308
|
-
- spec/integration/
|
|
309
|
-
- spec/integration/
|
|
310
|
-
- spec/integration/
|
|
311
|
-
- spec/integration/
|
|
312
|
-
- spec/integration/sql_retry/
|
|
313
|
-
- spec/integration/sql_retry/
|
|
314
|
-
- spec/integration/sql_retry/
|
|
315
|
-
- spec/integration/
|
|
316
|
-
- spec/integration/
|
|
317
|
-
- spec/
|
|
318
|
-
- spec/
|
|
319
|
-
- spec/
|
|
320
|
-
- spec/unit/
|
|
321
|
-
- spec/unit/
|
|
322
|
-
- spec/unit/
|
|
323
|
-
- spec/unit/
|
|
324
|
-
- spec/unit/
|
|
325
|
-
- spec/unit/
|
|
326
|
-
- spec/unit/
|
|
327
|
-
- spec/unit/
|
|
328
|
-
- spec/unit/
|
|
329
|
-
- spec/unit/
|
|
330
|
-
- spec/unit/
|
|
331
|
-
- spec/unit/
|
|
332
|
-
- spec/unit/
|
|
333
|
-
- spec/unit/
|
|
334
|
-
- spec/unit/
|
|
335
|
-
- spec/unit/
|
|
336
|
-
|
|
246
|
+
- .github/dependabot.yml
|
|
247
|
+
- .github/workflows/test.yml
|
|
248
|
+
- .gitignore
|
|
249
|
+
- .rubocop.yml
|
|
250
|
+
- .ruby-version
|
|
251
|
+
- Appraisals
|
|
252
|
+
- CHANGELOG.md
|
|
253
|
+
- Gemfile
|
|
254
|
+
- Gemfile.lock
|
|
255
|
+
- LICENSE
|
|
256
|
+
- README.md
|
|
257
|
+
- Rakefile
|
|
258
|
+
- dev.yml
|
|
259
|
+
- docker-compose-mysql-5.7.yml
|
|
260
|
+
- docker-compose-mysql-8.0.yml
|
|
261
|
+
- docker-compose.yml
|
|
262
|
+
- gemfiles/activerecord_7.2.gemfile
|
|
263
|
+
- gemfiles/activerecord_7.2.gemfile.lock
|
|
264
|
+
- gemfiles/activerecord_8.0.gemfile
|
|
265
|
+
- gemfiles/activerecord_8.0.gemfile.lock
|
|
266
|
+
- gemfiles/activerecord_8.1.gemfile
|
|
267
|
+
- gemfiles/activerecord_8.1.gemfile.lock
|
|
268
|
+
- gemfiles/activerecord_head.gemfile
|
|
269
|
+
- gemfiles/activerecord_head.gemfile.lock
|
|
270
|
+
- lhm.gemspec
|
|
271
|
+
- lib/lhm-shopify.rb
|
|
272
|
+
- lib/lhm.rb
|
|
273
|
+
- lib/lhm/atomic_switcher.rb
|
|
274
|
+
- lib/lhm/chunk_finder.rb
|
|
275
|
+
- lib/lhm/chunk_insert.rb
|
|
276
|
+
- lib/lhm/chunker.rb
|
|
277
|
+
- lib/lhm/cleanup/current.rb
|
|
278
|
+
- lib/lhm/command.rb
|
|
279
|
+
- lib/lhm/connection.rb
|
|
280
|
+
- lib/lhm/entangler.rb
|
|
281
|
+
- lib/lhm/intersection.rb
|
|
282
|
+
- lib/lhm/invoker.rb
|
|
283
|
+
- lib/lhm/locked_switcher.rb
|
|
284
|
+
- lib/lhm/migration.rb
|
|
285
|
+
- lib/lhm/migrator.rb
|
|
286
|
+
- lib/lhm/printer.rb
|
|
287
|
+
- lib/lhm/proxysql_helper.rb
|
|
288
|
+
- lib/lhm/railtie.rb
|
|
289
|
+
- lib/lhm/sql_helper.rb
|
|
290
|
+
- lib/lhm/sql_retry.rb
|
|
291
|
+
- lib/lhm/table.rb
|
|
292
|
+
- lib/lhm/table_name.rb
|
|
293
|
+
- lib/lhm/test_support.rb
|
|
294
|
+
- lib/lhm/throttler.rb
|
|
295
|
+
- lib/lhm/throttler/backoff_reduction.rb
|
|
296
|
+
- lib/lhm/throttler/replica_lag.rb
|
|
297
|
+
- lib/lhm/throttler/slave_lag.rb
|
|
298
|
+
- lib/lhm/throttler/threads_running.rb
|
|
299
|
+
- lib/lhm/throttler/time.rb
|
|
300
|
+
- lib/lhm/timestamp.rb
|
|
301
|
+
- lib/lhm/version.rb
|
|
302
|
+
- scripts/helpers/wait-for-dbs.sh
|
|
303
|
+
- scripts/mysql/reader/create_replication.sql
|
|
304
|
+
- scripts/mysql/writer/create_test_db.sql
|
|
305
|
+
- scripts/mysql/writer/create_users.sql
|
|
306
|
+
- scripts/proxysql/proxysql.cnf
|
|
307
|
+
- shipit.rubygems.yml
|
|
308
|
+
- spec/.lhm.example
|
|
309
|
+
- spec/README.md
|
|
310
|
+
- spec/fixtures/bigint_table.ddl
|
|
311
|
+
- spec/fixtures/composite_primary_key.ddl
|
|
312
|
+
- spec/fixtures/composite_primary_key_dest.ddl
|
|
313
|
+
- spec/fixtures/composite_primary_key_with_varchar_columns.ddl
|
|
314
|
+
- spec/fixtures/composite_primary_key_with_varchar_columns_dest.ddl
|
|
315
|
+
- spec/fixtures/custom_primary_key.ddl
|
|
316
|
+
- spec/fixtures/custom_primary_key_dest.ddl
|
|
317
|
+
- spec/fixtures/destination.ddl
|
|
318
|
+
- spec/fixtures/lines.ddl
|
|
319
|
+
- spec/fixtures/myisam_users.ddl
|
|
320
|
+
- spec/fixtures/origin.ddl
|
|
321
|
+
- spec/fixtures/permissions.ddl
|
|
322
|
+
- spec/fixtures/small_table.ddl
|
|
323
|
+
- spec/fixtures/tracks.ddl
|
|
324
|
+
- spec/fixtures/users.ddl
|
|
325
|
+
- spec/fixtures/wo_id_int_column.ddl
|
|
326
|
+
- spec/integration/atomic_switcher_spec.rb
|
|
327
|
+
- spec/integration/chunk_insert_spec.rb
|
|
328
|
+
- spec/integration/chunker_spec.rb
|
|
329
|
+
- spec/integration/cleanup_spec.rb
|
|
330
|
+
- spec/integration/database.yml
|
|
331
|
+
- spec/integration/entangler_spec.rb
|
|
332
|
+
- spec/integration/integration_helper.rb
|
|
333
|
+
- spec/integration/invoker_spec.rb
|
|
334
|
+
- spec/integration/lhm_spec.rb
|
|
335
|
+
- spec/integration/lock_wait_timeout_spec.rb
|
|
336
|
+
- spec/integration/locked_switcher_spec.rb
|
|
337
|
+
- spec/integration/proxysql_spec.rb
|
|
338
|
+
- spec/integration/sql_retry/db_connection_helper.rb
|
|
339
|
+
- spec/integration/sql_retry/lock_wait_spec.rb
|
|
340
|
+
- spec/integration/sql_retry/lock_wait_timeout_test_helper.rb
|
|
341
|
+
- spec/integration/sql_retry/proxysql_helper.rb
|
|
342
|
+
- spec/integration/sql_retry/retry_with_proxysql_spec.rb
|
|
343
|
+
- spec/integration/table_spec.rb
|
|
344
|
+
- spec/integration/toxiproxy_helper.rb
|
|
345
|
+
- spec/test_helper.rb
|
|
346
|
+
- spec/unit/atomic_switcher_spec.rb
|
|
347
|
+
- spec/unit/chunk_finder_spec.rb
|
|
348
|
+
- spec/unit/chunk_insert_spec.rb
|
|
349
|
+
- spec/unit/chunker_spec.rb
|
|
350
|
+
- spec/unit/connection_spec.rb
|
|
351
|
+
- spec/unit/entangler_spec.rb
|
|
352
|
+
- spec/unit/intersection_spec.rb
|
|
353
|
+
- spec/unit/lhm_spec.rb
|
|
354
|
+
- spec/unit/locked_switcher_spec.rb
|
|
355
|
+
- spec/unit/migrator_spec.rb
|
|
356
|
+
- spec/unit/printer_spec.rb
|
|
357
|
+
- spec/unit/sql_helper_spec.rb
|
|
358
|
+
- spec/unit/table_name_spec.rb
|
|
359
|
+
- spec/unit/table_spec.rb
|
|
360
|
+
- spec/unit/throttler/replica_lag_spec.rb
|
|
361
|
+
- spec/unit/throttler/threads_running_spec.rb
|
|
362
|
+
- spec/unit/throttler_spec.rb
|
|
363
|
+
- spec/unit/unit_helper.rb
|
|
364
|
+
homepage: "http://github.com/shopify/lhm"
|
|
337
365
|
licenses:
|
|
338
|
-
- BSD-3-Clause
|
|
366
|
+
- BSD-3-Clause
|
|
339
367
|
metadata:
|
|
340
|
-
allowed_push_host: https://rubygems.org
|
|
368
|
+
allowed_push_host: "https://rubygems.org"
|
|
341
369
|
rdoc_options: []
|
|
342
370
|
require_paths:
|
|
343
|
-
- lib
|
|
371
|
+
- lib
|
|
344
372
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
345
373
|
requirements:
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
374
|
+
-
|
|
375
|
+
- ">="
|
|
376
|
+
- !ruby/object:Gem::Version
|
|
377
|
+
version: 3.0.0
|
|
349
378
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
350
379
|
requirements:
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
380
|
+
-
|
|
381
|
+
- ">="
|
|
382
|
+
- !ruby/object:Gem::Version
|
|
383
|
+
version: "0"
|
|
354
384
|
requirements: []
|
|
355
|
-
rubygems_version:
|
|
385
|
+
rubygems_version: 4.1.0
|
|
356
386
|
specification_version: 4
|
|
357
387
|
summary: online schema changer for mysql
|
|
358
388
|
test_files: []
|