work_shaper 0.1.2.7 → 0.1.3.1rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/work_shaper/manager.rb +8 -7
- data/lib/work_shaper/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ee5120c590964d5c74c75ef38a3c739d5849213d7c36006050a26d5868378ca
|
4
|
+
data.tar.gz: 1e02c5b221518cbb9e5c96891c831d783cfc14895cffa7e4a6a5e8a24b60f1f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc444bf26f6bc591acf11d6bc283c19fa1a30fbfe33c215e6b102397de2847fabc4358e87a5c32632a9f770323239b87d6d35b7bc468aa4b3dbf767eb775eb27
|
7
|
+
data.tar.gz: efdea370299cbe549ffea400c69f3a386a7b14f2295567fa8844b4e5748a67e6878824eafad4763da583420c7657792935c0da5f0583d007dc8beea5b7fee050
|
data/lib/work_shaper/manager.rb
CHANGED
@@ -35,7 +35,7 @@ module WorkShaper
|
|
35
35
|
|
36
36
|
@heartbeat = Thread.new do
|
37
37
|
while true
|
38
|
-
report
|
38
|
+
report(detailed: true)
|
39
39
|
sleep heartbeat_period_sec
|
40
40
|
end
|
41
41
|
rescue => e
|
@@ -134,19 +134,20 @@ module WorkShaper
|
|
134
134
|
end
|
135
135
|
|
136
136
|
def offset_ack_unsafe(partition)
|
137
|
-
completed = @completed_offsets[partition]
|
138
|
-
received = @received_offsets[partition]
|
137
|
+
completed = @completed_offsets[partition].sort!
|
138
|
+
received = @received_offsets[partition].sort!
|
139
139
|
|
140
|
-
offset = completed.
|
141
|
-
while received.any? && received.
|
140
|
+
offset = completed.first
|
141
|
+
while received.any? && received.first == offset
|
142
142
|
# We observed Kafka sending the same message twice, even after
|
143
143
|
# having committed the offset. Here we skip this offset if we
|
144
144
|
# know it has already been committed.
|
145
145
|
last_offset = @last_ack[partition]
|
146
146
|
if last_offset && offset <= last_offset
|
147
147
|
WorkShaper.logger.warn(
|
148
|
-
{ message: 'Received
|
149
|
-
offset: "#{partition}:#{offset}"
|
148
|
+
{ message: 'Received Duplicate Offset',
|
149
|
+
offset: "#{partition}:#{offset}",
|
150
|
+
last_acked: last_offset,
|
150
151
|
})
|
151
152
|
else
|
152
153
|
result = @ack.call(partition, offset)
|
data/lib/work_shaper/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: work_shaper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3.1rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jerry Fernholz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -62,9 +62,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: 2.6.0
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - ">"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
67
|
+
version: 1.3.1
|
68
68
|
requirements: []
|
69
69
|
rubygems_version: 3.4.10
|
70
70
|
signing_key:
|