lhm-shopify 3.5.4 → 4.0.0
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 +6 -6
- data/Appraisals +8 -13
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +22 -20
- data/README.md +14 -7
- data/dev.yml +12 -8
- data/docker-compose.yml +2 -0
- data/gemfiles/activerecord_6.0.gemfile +1 -1
- data/gemfiles/activerecord_6.0.gemfile.lock +25 -21
- data/gemfiles/activerecord_6.1.gemfile.lock +17 -13
- data/gemfiles/{activerecord_7.0.0.alpha2.gemfile → activerecord_7.0.gemfile} +1 -1
- data/gemfiles/{activerecord_7.0.0.alpha2.gemfile.lock → activerecord_7.0.gemfile.lock} +23 -19
- data/gemfiles/{activerecord_5.2.gemfile → activerecord_7.1.0.beta1.gemfile} +1 -3
- data/gemfiles/activerecord_7.1.0.beta1.gemfile.lock +81 -0
- data/lhm.gemspec +1 -1
- data/lib/lhm/sql_helper.rb +1 -1
- data/lib/lhm/sql_retry.rb +37 -47
- data/lib/lhm/throttler/replica_lag.rb +162 -0
- data/lib/lhm/throttler/slave_lag.rb +5 -155
- data/lib/lhm/throttler/threads_running.rb +3 -1
- data/lib/lhm/throttler.rb +7 -3
- data/lib/lhm/version.rb +1 -1
- data/spec/.lhm.example +1 -1
- data/spec/README.md +8 -9
- data/spec/integration/atomic_switcher_spec.rb +2 -2
- data/spec/integration/chunk_insert_spec.rb +2 -2
- data/spec/integration/chunker_spec.rb +33 -38
- data/spec/integration/database.yml +1 -1
- data/spec/integration/entangler_spec.rb +4 -4
- data/spec/integration/integration_helper.rb +12 -12
- data/spec/integration/lhm_spec.rb +41 -32
- data/spec/integration/locked_switcher_spec.rb +2 -2
- data/spec/integration/sql_retry/retry_with_proxysql_spec.rb +6 -5
- data/spec/integration/toxiproxy_helper.rb +1 -1
- data/spec/test_helper.rb +3 -0
- data/spec/unit/printer_spec.rb +2 -6
- data/spec/unit/sql_helper_spec.rb +2 -2
- data/spec/unit/throttler/{slave_lag_spec.rb → replica_lag_spec.rb} +79 -79
- data/spec/unit/throttler/threads_running_spec.rb +18 -0
- data/spec/unit/throttler_spec.rb +8 -8
- metadata +10 -9
- data/gemfiles/activerecord_5.2.gemfile.lock +0 -65
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__)) + '/../unit_helper'
|
2
2
|
|
3
|
-
require 'lhm/throttler/
|
3
|
+
require 'lhm/throttler/replica_lag'
|
4
4
|
|
5
5
|
describe Lhm::Throttler do
|
6
6
|
include UnitHelper
|
@@ -32,7 +32,7 @@ describe Lhm::Throttler do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
describe Lhm::Throttler::
|
35
|
+
describe Lhm::Throttler::Replica do
|
36
36
|
include UnitHelper
|
37
37
|
|
38
38
|
before :each do
|
@@ -53,21 +53,21 @@ describe Lhm::Throttler::Slave do
|
|
53
53
|
|
54
54
|
describe 'on connection error' do
|
55
55
|
it 'logs and returns nil' do
|
56
|
-
assert_nil(Lhm::Throttler::
|
56
|
+
assert_nil(Lhm::Throttler::Replica.new('replica', @dummy_mysql_client_config).connection)
|
57
57
|
|
58
58
|
log_messages = @logs.string.lines
|
59
59
|
assert_equal(2, log_messages.length)
|
60
|
-
assert log_messages[0].include? "Connecting to
|
61
|
-
assert log_messages[1].include? "Error connecting to
|
60
|
+
assert log_messages[0].include? "Connecting to replica on database: db"
|
61
|
+
assert log_messages[1].include? "Error connecting to replica: Unknown MySQL server host 'replica'"
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
65
|
describe 'with proper config' do
|
66
66
|
it "creates a new Mysql2::Client" do
|
67
|
-
expected_config = { username: 'user', password: 'pw', database: 'db', host: '
|
67
|
+
expected_config = { username: 'user', password: 'pw', database: 'db', host: 'replica' }
|
68
68
|
Mysql2::Client.stubs(:new).with(expected_config).returns(mock())
|
69
69
|
|
70
|
-
assert Lhm::Throttler::
|
70
|
+
assert Lhm::Throttler::Replica.new('replica', @dummy_mysql_client_config).connection
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
@@ -82,11 +82,11 @@ describe Lhm::Throttler::Slave do
|
|
82
82
|
|
83
83
|
Mysql2::Client.stubs(:new).returns(mock())
|
84
84
|
|
85
|
-
assert Lhm::Throttler::
|
85
|
+
assert Lhm::Throttler::Replica.new('replica').connection
|
86
86
|
|
87
87
|
log_messages = @logs.string.lines
|
88
88
|
assert_equal(1, log_messages.length)
|
89
|
-
assert log_messages[0].include? "Connecting to
|
89
|
+
assert log_messages[0].include? "Connecting to replica on database: db"
|
90
90
|
end
|
91
91
|
end
|
92
92
|
end
|
@@ -95,16 +95,16 @@ describe Lhm::Throttler::Slave do
|
|
95
95
|
before do
|
96
96
|
class Connection
|
97
97
|
def self.query(query)
|
98
|
-
if query == Lhm::Throttler::
|
98
|
+
if query == Lhm::Throttler::Replica::SQL_SELECT_MAX_REPLICA_LAG
|
99
99
|
[{ 'Seconds_Behind_Master' => 20 }]
|
100
|
-
elsif query == Lhm::Throttler::
|
100
|
+
elsif query == Lhm::Throttler::Replica::SQL_SELECT_REPLICA_HOSTS
|
101
101
|
[{ 'host' => '1.1.1.1:80' }]
|
102
102
|
end
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
-
@
|
107
|
-
@
|
106
|
+
@replica = Lhm::Throttler::Replica.new('replica', @dummy_mysql_client_config)
|
107
|
+
@replica.instance_variable_set(:@connection, Connection)
|
108
108
|
|
109
109
|
class StoppedConnection
|
110
110
|
def self.query(query)
|
@@ -112,54 +112,54 @@ describe Lhm::Throttler::Slave do
|
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
|
-
@
|
116
|
-
@
|
115
|
+
@stopped_replica = Lhm::Throttler::Replica.new('stopped_replica', @dummy_mysql_client_config)
|
116
|
+
@stopped_replica.instance_variable_set(:@connection, StoppedConnection)
|
117
117
|
end
|
118
118
|
|
119
119
|
describe "#lag" do
|
120
|
-
it "returns the
|
121
|
-
assert_equal(20, @
|
120
|
+
it "returns the replica lag" do
|
121
|
+
assert_equal(20, @replica.lag)
|
122
122
|
end
|
123
123
|
end
|
124
124
|
|
125
|
-
describe "#lag with a stopped
|
126
|
-
it "returns 0
|
127
|
-
assert_equal(0, @
|
125
|
+
describe "#lag with a stopped replica" do
|
126
|
+
it "returns 0 replica lag" do
|
127
|
+
assert_equal(0, @stopped_replica.lag)
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
-
describe "#
|
131
|
+
describe "#replica_hosts" do
|
132
132
|
it "returns the hosts" do
|
133
|
-
assert_equal(['1.1.1.1'], @
|
133
|
+
assert_equal(['1.1.1.1'], @replica.replica_hosts)
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
137
137
|
describe "#lag on connection error" do
|
138
|
-
it "logs and returns 0
|
138
|
+
it "logs and returns 0 replica lag" do
|
139
139
|
client = mock()
|
140
140
|
client.stubs(:query).raises(Mysql2::Error, "Can't connect to MySQL server")
|
141
|
-
Lhm::Throttler::
|
142
|
-
Lhm::Throttler::
|
141
|
+
Lhm::Throttler::Replica.any_instance.stubs(:client).returns(client)
|
142
|
+
Lhm::Throttler::Replica.any_instance.stubs(:config).returns([])
|
143
143
|
|
144
|
-
|
145
|
-
Logger.any_instance.expects(:info).with("Unable to connect and/or query
|
146
|
-
assert_equal(0,
|
144
|
+
replica = Lhm::Throttler::Replica.new('replica', @dummy_mysql_client_config)
|
145
|
+
Logger.any_instance.expects(:info).with("Unable to connect and/or query replica: Can't connect to MySQL server")
|
146
|
+
assert_equal(0, replica.lag)
|
147
147
|
end
|
148
148
|
end
|
149
149
|
end
|
150
150
|
end
|
151
151
|
|
152
|
-
describe Lhm::Throttler::
|
152
|
+
describe Lhm::Throttler::ReplicaLag do
|
153
153
|
include UnitHelper
|
154
154
|
|
155
155
|
before :each do
|
156
|
-
@throttler = Lhm::Throttler::
|
156
|
+
@throttler = Lhm::Throttler::ReplicaLag.new
|
157
157
|
end
|
158
158
|
|
159
159
|
describe '#throttle_seconds' do
|
160
|
-
describe 'with no
|
160
|
+
describe 'with no replica lag' do
|
161
161
|
before do
|
162
|
-
def @throttler.
|
162
|
+
def @throttler.max_current_replica_lag
|
163
163
|
0
|
164
164
|
end
|
165
165
|
end
|
@@ -170,9 +170,9 @@ describe Lhm::Throttler::SlaveLag do
|
|
170
170
|
end
|
171
171
|
end
|
172
172
|
|
173
|
-
describe 'with a large
|
173
|
+
describe 'with a large replica lag' do
|
174
174
|
before do
|
175
|
-
def @throttler.
|
175
|
+
def @throttler.max_current_replica_lag
|
176
176
|
100
|
177
177
|
end
|
178
178
|
end
|
@@ -183,14 +183,14 @@ describe Lhm::Throttler::SlaveLag do
|
|
183
183
|
end
|
184
184
|
|
185
185
|
it 'does not increase the timeout past the maximum' do
|
186
|
-
@throttler.timeout_seconds = Lhm::Throttler::
|
187
|
-
assert_equal(Lhm::Throttler::
|
186
|
+
@throttler.timeout_seconds = Lhm::Throttler::ReplicaLag::MAX_TIMEOUT
|
187
|
+
assert_equal(Lhm::Throttler::ReplicaLag::MAX_TIMEOUT, @throttler.send(:throttle_seconds))
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
191
|
-
describe 'with no
|
191
|
+
describe 'with no replica lag after it has previously been increased' do
|
192
192
|
before do
|
193
|
-
def @throttler.
|
193
|
+
def @throttler.max_current_replica_lag
|
194
194
|
0
|
195
195
|
end
|
196
196
|
end
|
@@ -202,56 +202,56 @@ describe Lhm::Throttler::SlaveLag do
|
|
202
202
|
end
|
203
203
|
|
204
204
|
it 'does not decrease the timeout past the minimum on repeated runs' do
|
205
|
-
@throttler.timeout_seconds = Lhm::Throttler::
|
206
|
-
assert_equal(Lhm::Throttler::
|
207
|
-
assert_equal(Lhm::Throttler::
|
205
|
+
@throttler.timeout_seconds = Lhm::Throttler::ReplicaLag::INITIAL_TIMEOUT * 2
|
206
|
+
assert_equal(Lhm::Throttler::ReplicaLag::INITIAL_TIMEOUT, @throttler.send(:throttle_seconds))
|
207
|
+
assert_equal(Lhm::Throttler::ReplicaLag::INITIAL_TIMEOUT, @throttler.send(:throttle_seconds))
|
208
208
|
end
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
212
|
-
describe '#
|
213
|
-
describe 'with multiple
|
212
|
+
describe '#max_current_replica_lag' do
|
213
|
+
describe 'with multiple replicas' do
|
214
214
|
it 'returns the largest amount of lag' do
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
Lhm::Throttler::
|
220
|
-
assert_equal 5, @throttler.send(:
|
215
|
+
replica1 = mock()
|
216
|
+
replica2 = mock()
|
217
|
+
replica1.stubs(:lag).returns(5)
|
218
|
+
replica2.stubs(:lag).returns(0)
|
219
|
+
Lhm::Throttler::ReplicaLag.any_instance.stubs(:replicas).returns([replica1, replica2])
|
220
|
+
assert_equal 5, @throttler.send(:max_current_replica_lag)
|
221
221
|
end
|
222
222
|
end
|
223
223
|
|
224
|
-
describe 'with MySQL stopped on the
|
225
|
-
it 'assumes 0
|
224
|
+
describe 'with MySQL stopped on the replica' do
|
225
|
+
it 'assumes 0 replica lag' do
|
226
226
|
client = mock()
|
227
227
|
client.stubs(:query).raises(Mysql2::Error, "Can't connect to MySQL server")
|
228
|
-
Lhm::Throttler::
|
228
|
+
Lhm::Throttler::Replica.any_instance.stubs(:client).returns(client)
|
229
229
|
|
230
|
-
Lhm::Throttler::
|
231
|
-
Lhm::Throttler::
|
232
|
-
@throttler.stubs(:
|
230
|
+
Lhm::Throttler::Replica.any_instance.stubs(:prepare_connection_config).returns([])
|
231
|
+
Lhm::Throttler::Replica.any_instance.stubs(:replica_hosts).returns(['1.1.1.2'])
|
232
|
+
@throttler.stubs(:master_replica_hosts).returns(['1.1.1.1'])
|
233
233
|
|
234
|
-
assert_equal 0, @throttler.send(:
|
234
|
+
assert_equal 0, @throttler.send(:max_current_replica_lag)
|
235
235
|
end
|
236
236
|
end
|
237
237
|
end
|
238
238
|
|
239
|
-
describe '#
|
240
|
-
describe 'with no
|
239
|
+
describe '#get_replicas' do
|
240
|
+
describe 'with no replicas' do
|
241
241
|
before do
|
242
|
-
def @throttler.
|
242
|
+
def @throttler.master_replica_hosts
|
243
243
|
[]
|
244
244
|
end
|
245
245
|
end
|
246
246
|
|
247
|
-
it 'returns no
|
248
|
-
assert_equal([], @throttler.send(:
|
247
|
+
it 'returns no replicas' do
|
248
|
+
assert_equal([], @throttler.send(:get_replicas))
|
249
249
|
end
|
250
250
|
end
|
251
251
|
|
252
|
-
describe 'with multiple
|
252
|
+
describe 'with multiple replicas' do
|
253
253
|
before do
|
254
|
-
class
|
254
|
+
class TestReplica
|
255
255
|
attr_reader :host, :connection
|
256
256
|
|
257
257
|
def initialize(host, _)
|
@@ -259,7 +259,7 @@ describe Lhm::Throttler::SlaveLag do
|
|
259
259
|
@connection = 'conn' if @host
|
260
260
|
end
|
261
261
|
|
262
|
-
def
|
262
|
+
def replica_hosts
|
263
263
|
if @host == '1.1.1.1'
|
264
264
|
['1.1.1.2', '1.1.1.3']
|
265
265
|
else
|
@@ -268,21 +268,21 @@ describe Lhm::Throttler::SlaveLag do
|
|
268
268
|
end
|
269
269
|
end
|
270
270
|
|
271
|
-
@
|
272
|
-
|
271
|
+
@create_replica = lambda { |host, config|
|
272
|
+
TestReplica.new(host, config)
|
273
273
|
}
|
274
274
|
end
|
275
275
|
|
276
276
|
describe 'without the :check_only option' do
|
277
277
|
before do
|
278
|
-
def @throttler.
|
278
|
+
def @throttler.master_replica_hosts
|
279
279
|
['1.1.1.1', '1.1.1.4']
|
280
280
|
end
|
281
281
|
end
|
282
282
|
|
283
|
-
it 'returns the
|
284
|
-
Lhm::Throttler::
|
285
|
-
assert_equal(["1.1.1.4", "1.1.1.1", "1.1.1.3", "1.1.1.2"], @throttler.send(:
|
283
|
+
it 'returns the replica instances' do
|
284
|
+
Lhm::Throttler::Replica.stubs(:new).returns(@create_replica) do
|
285
|
+
assert_equal(["1.1.1.4", "1.1.1.1", "1.1.1.3", "1.1.1.2"], @throttler.send(:get_replicas).map(&:host))
|
286
286
|
end
|
287
287
|
end
|
288
288
|
end
|
@@ -291,28 +291,28 @@ describe Lhm::Throttler::SlaveLag do
|
|
291
291
|
describe 'with a callable argument' do
|
292
292
|
before do
|
293
293
|
check_only = lambda { { 'host' => '1.1.1.3' } }
|
294
|
-
@throttler = Lhm::Throttler::
|
294
|
+
@throttler = Lhm::Throttler::ReplicaLag.new :check_only => check_only
|
295
295
|
end
|
296
296
|
|
297
|
-
it 'returns only that single
|
298
|
-
Lhm::Throttler::
|
299
|
-
assert_equal ['1.1.1.3'], @throttler.send(:
|
297
|
+
it 'returns only that single replica' do
|
298
|
+
Lhm::Throttler::Replica.stubs(:new).returns(@create_replica) do
|
299
|
+
assert_equal ['1.1.1.3'], @throttler.send(:get_replicas).map(&:host)
|
300
300
|
end
|
301
301
|
end
|
302
302
|
end
|
303
303
|
|
304
304
|
describe 'with a non-callable argument' do
|
305
305
|
before do
|
306
|
-
@throttler = Lhm::Throttler::
|
306
|
+
@throttler = Lhm::Throttler::ReplicaLag.new :check_only => 'I cannot be called'
|
307
307
|
|
308
|
-
def @throttler.
|
308
|
+
def @throttler.master_replica_hosts
|
309
309
|
['1.1.1.1', '1.1.1.4']
|
310
310
|
end
|
311
311
|
end
|
312
312
|
|
313
|
-
it 'returns all the
|
314
|
-
Lhm::Throttler::
|
315
|
-
assert_equal(["1.1.1.4", "1.1.1.1", "1.1.1.3", "1.1.1.2"], @throttler.send(:
|
313
|
+
it 'returns all the replica instances' do
|
314
|
+
Lhm::Throttler::Replica.stubs(:new).returns(@create_replica) do
|
315
|
+
assert_equal(["1.1.1.4", "1.1.1.1", "1.1.1.3", "1.1.1.2"], @throttler.send(:get_replicas).map(&:host))
|
316
316
|
end
|
317
317
|
end
|
318
318
|
end
|
@@ -9,6 +9,24 @@ describe Lhm::Throttler::ThreadsRunning do
|
|
9
9
|
@throttler = Lhm::Throttler::ThreadsRunning.new
|
10
10
|
end
|
11
11
|
|
12
|
+
describe '#stride' do
|
13
|
+
describe 'default value' do
|
14
|
+
it 'is present' do
|
15
|
+
assert_equal(@throttler.stride, 2_000)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe 'when set by user' do
|
20
|
+
before do
|
21
|
+
@throttler = Lhm::Throttler::ThreadsRunning.new(stride: 100_500)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'returns that value' do
|
25
|
+
assert_equal(@throttler.stride, 100_500)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
12
30
|
describe '#throttle_seconds' do
|
13
31
|
describe 'with no mysql activity' do
|
14
32
|
before do
|
data/spec/unit/throttler_spec.rb
CHANGED
@@ -31,13 +31,13 @@ describe Lhm::Throttler do
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
describe 'when passing a
|
34
|
+
describe 'when passing a replica_lag_throttler key' do
|
35
35
|
before do
|
36
|
-
@mock.setup_throttler(:
|
36
|
+
@mock.setup_throttler(:replica_lag_throttler, allowed_lag: 20)
|
37
37
|
end
|
38
38
|
|
39
|
-
it 'instantiates the
|
40
|
-
value(@mock.throttler.class).must_equal Lhm::Throttler::
|
39
|
+
it 'instantiates the replica_lag throttle' do
|
40
|
+
value(@mock.throttler.class).must_equal Lhm::Throttler::ReplicaLag
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'returns 20 seconds as allowed_lag' do
|
@@ -66,10 +66,10 @@ describe Lhm::Throttler do
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
describe 'when passing a
|
69
|
+
describe 'when passing a replica_lag_throttler instance' do
|
70
70
|
|
71
71
|
before do
|
72
|
-
@instance = Lhm::Throttler::
|
72
|
+
@instance = Lhm::Throttler::ReplicaLag.new
|
73
73
|
def @instance.timeout_seconds
|
74
74
|
0
|
75
75
|
end
|
@@ -98,10 +98,10 @@ describe Lhm::Throttler do
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
describe 'when passing a
|
101
|
+
describe 'when passing a replica_lag_throttler class' do
|
102
102
|
|
103
103
|
before do
|
104
|
-
@klass = Class.new(Lhm::Throttler::
|
104
|
+
@klass = Class.new(Lhm::Throttler::ReplicaLag)
|
105
105
|
@mock.setup_throttler(@klass)
|
106
106
|
end
|
107
107
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhm-shopify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SoundCloud
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2023-09-18 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: retriable
|
@@ -189,14 +189,14 @@ files:
|
|
189
189
|
- Rakefile
|
190
190
|
- dev.yml
|
191
191
|
- docker-compose.yml
|
192
|
-
- gemfiles/activerecord_5.2.gemfile
|
193
|
-
- gemfiles/activerecord_5.2.gemfile.lock
|
194
192
|
- gemfiles/activerecord_6.0.gemfile
|
195
193
|
- gemfiles/activerecord_6.0.gemfile.lock
|
196
194
|
- gemfiles/activerecord_6.1.gemfile
|
197
195
|
- gemfiles/activerecord_6.1.gemfile.lock
|
198
|
-
- gemfiles/activerecord_7.0.
|
199
|
-
- gemfiles/activerecord_7.0.
|
196
|
+
- gemfiles/activerecord_7.0.gemfile
|
197
|
+
- gemfiles/activerecord_7.0.gemfile.lock
|
198
|
+
- gemfiles/activerecord_7.1.0.beta1.gemfile
|
199
|
+
- gemfiles/activerecord_7.1.0.beta1.gemfile.lock
|
200
200
|
- lhm.gemspec
|
201
201
|
- lib/lhm-shopify.rb
|
202
202
|
- lib/lhm.rb
|
@@ -222,6 +222,7 @@ files:
|
|
222
222
|
- lib/lhm/table_name.rb
|
223
223
|
- lib/lhm/test_support.rb
|
224
224
|
- lib/lhm/throttler.rb
|
225
|
+
- lib/lhm/throttler/replica_lag.rb
|
225
226
|
- lib/lhm/throttler/slave_lag.rb
|
226
227
|
- lib/lhm/throttler/threads_running.rb
|
227
228
|
- lib/lhm/throttler/time.rb
|
@@ -282,7 +283,7 @@ files:
|
|
282
283
|
- spec/unit/sql_helper_spec.rb
|
283
284
|
- spec/unit/table_name_spec.rb
|
284
285
|
- spec/unit/table_spec.rb
|
285
|
-
- spec/unit/throttler/
|
286
|
+
- spec/unit/throttler/replica_lag_spec.rb
|
286
287
|
- spec/unit/throttler/threads_running_spec.rb
|
287
288
|
- spec/unit/throttler_spec.rb
|
288
289
|
- spec/unit/unit_helper.rb
|
@@ -299,14 +300,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
299
300
|
requirements:
|
300
301
|
- - ">="
|
301
302
|
- !ruby/object:Gem::Version
|
302
|
-
version:
|
303
|
+
version: 3.0.0
|
303
304
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
304
305
|
requirements:
|
305
306
|
- - ">="
|
306
307
|
- !ruby/object:Gem::Version
|
307
308
|
version: '0'
|
308
309
|
requirements: []
|
309
|
-
rubygems_version: 3.
|
310
|
+
rubygems_version: 3.4.19
|
310
311
|
signing_key:
|
311
312
|
specification_version: 4
|
312
313
|
summary: online schema changer for mysql
|
@@ -1,65 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ..
|
3
|
-
specs:
|
4
|
-
lhm-shopify (3.5.4)
|
5
|
-
retriable (>= 3.0.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activemodel (5.2.6)
|
11
|
-
activesupport (= 5.2.6)
|
12
|
-
activerecord (5.2.6)
|
13
|
-
activemodel (= 5.2.6)
|
14
|
-
activesupport (= 5.2.6)
|
15
|
-
arel (>= 9.0)
|
16
|
-
activesupport (5.2.6)
|
17
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
-
i18n (>= 0.7, < 2)
|
19
|
-
minitest (~> 5.1)
|
20
|
-
tzinfo (~> 1.1)
|
21
|
-
after_do (0.4.0)
|
22
|
-
appraisal (2.4.1)
|
23
|
-
bundler
|
24
|
-
rake
|
25
|
-
thor (>= 0.14.0)
|
26
|
-
arel (9.0.0)
|
27
|
-
byebug (11.1.3)
|
28
|
-
concurrent-ruby (1.1.9)
|
29
|
-
docile (1.3.5)
|
30
|
-
i18n (1.8.11)
|
31
|
-
concurrent-ruby (~> 1.0)
|
32
|
-
minitest (5.14.4)
|
33
|
-
mocha (1.13.0)
|
34
|
-
mysql2 (0.5.3)
|
35
|
-
rake (13.0.6)
|
36
|
-
retriable (3.1.2)
|
37
|
-
simplecov (0.18.5)
|
38
|
-
docile (~> 1.1)
|
39
|
-
simplecov-html (~> 0.11)
|
40
|
-
simplecov-html (0.12.3)
|
41
|
-
thor (1.1.0)
|
42
|
-
thread_safe (0.3.6)
|
43
|
-
toxiproxy (2.0.0)
|
44
|
-
tzinfo (1.2.9)
|
45
|
-
thread_safe (~> 0.1)
|
46
|
-
|
47
|
-
PLATFORMS
|
48
|
-
x86_64-darwin-20
|
49
|
-
|
50
|
-
DEPENDENCIES
|
51
|
-
activerecord (= 5.2.6)
|
52
|
-
after_do
|
53
|
-
appraisal
|
54
|
-
byebug
|
55
|
-
docile (= 1.3.5)
|
56
|
-
lhm-shopify!
|
57
|
-
minitest
|
58
|
-
mocha
|
59
|
-
mysql2
|
60
|
-
rake
|
61
|
-
simplecov (= 0.18.5)
|
62
|
-
toxiproxy
|
63
|
-
|
64
|
-
BUNDLED WITH
|
65
|
-
2.2.22
|