tina4ruby 3.13.162 → 3.13.163
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 -0
- data/lib/tina4/queue_backends/kafka_backend.rb +17 -9
- data/lib/tina4/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: 34f4ce86795d403ce1236cfcdd459faa59f11fd43f7cf9d3a9a3dc9d13ec5209
|
|
4
|
+
data.tar.gz: 1a613e2d130a451750e228b99daf2e33bba88b5378bdd5ccb83cd99f1fbc05c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 60c7c05fee96e02aa8320b77e2ab0b6a1ed9458cc5456bcfb18284dc8ff4f1e5a1f0ee03e1056c0004590ef19e2f17c56c6466fd53665b0accb0fae356c39cda
|
|
7
|
+
data.tar.gz: 0232f479a2f5bcd8fa9e3cf0940ffcf717d2940919656762151b3abf6e6f88e4f2527715a483f5bfbb515d7772f97457ccb7b7c316125a845e2eb6ddbf958e42
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ number means the same thing everywhere.
|
|
|
6
6
|
**The authoritative release notes for every shipped version live in the documentation:**
|
|
7
7
|
https://tina4.com/ruby/36-releases
|
|
8
8
|
|
|
9
|
+
## 3.13.163 - 2026-11-13
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- A Kafka tombstone (a null-value record, such as a Debezium delete marker) no longer stops a consumer short. 3.13.162 stopped the crash but answered a tombstone with `nil`, so a single-pass drain (`consume(poll_interval: 0)`) read it as an empty queue: the records behind it were never reached, and a fresh process stopped at the same offset on every run. The poll loop now skips tombstones and keeps polling, still bounded by `dequeue`'s deadline (1 s steady state, the assign timeout on first subscribe). Nothing is committed on the tombstone path: acknowledging the next record commits past the skipped tombstones, so a restart gets past them. Acknowledge, retry and dead-letter are unchanged. Verified against a live broker producing real tombstones (#169, parity with tina4-python#309, tina4-php#357, tina4-nodejs#194).
|
|
14
|
+
|
|
9
15
|
## 3.13.162 - 2026-11-10
|
|
10
16
|
|
|
11
17
|
### Fixed
|
|
@@ -150,15 +150,7 @@ module Tina4
|
|
|
150
150
|
# TINA4_KAFKA_ASSIGN_TIMEOUT, default 15s); steady state stays one ~1s poll.
|
|
151
151
|
deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) +
|
|
152
152
|
(first ? (ENV["TINA4_KAFKA_ASSIGN_TIMEOUT"] || "15").to_f : 1.0)
|
|
153
|
-
msg =
|
|
154
|
-
loop do
|
|
155
|
-
candidate = @consumer.poll(500)
|
|
156
|
-
if candidate
|
|
157
|
-
msg = candidate
|
|
158
|
-
break
|
|
159
|
-
end
|
|
160
|
-
break if Process.clock_gettime(Process::CLOCK_MONOTONIC) >= deadline
|
|
161
|
-
end
|
|
153
|
+
msg = poll_past_tombstones(deadline)
|
|
162
154
|
return nil unless msg
|
|
163
155
|
|
|
164
156
|
job = job_from_message(topic, msg)
|
|
@@ -170,6 +162,22 @@ module Tina4
|
|
|
170
162
|
nil
|
|
171
163
|
end
|
|
172
164
|
|
|
165
|
+
# Poll until a record with a value arrives or the deadline passes.
|
|
166
|
+
#
|
|
167
|
+
# A tombstone carries no job: skip it and poll on. Returning nil at the
|
|
168
|
+
# first one read as an empty queue, so a single-pass drain
|
|
169
|
+
# (consume(poll_interval: 0)) stopped at the tombstone. The deadline holds
|
|
170
|
+
# while skipping too: a steady stream of tombstones must not hold dequeue
|
|
171
|
+
# past it. Nothing is committed here: acknowledging the next record commits
|
|
172
|
+
# past the skipped tombstones, as before.
|
|
173
|
+
def poll_past_tombstones(deadline)
|
|
174
|
+
loop do
|
|
175
|
+
candidate = @consumer.poll(500)
|
|
176
|
+
return candidate if candidate && !candidate.payload.nil?
|
|
177
|
+
return nil if Process.clock_gettime(Process::CLOCK_MONOTONIC) >= deadline
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
173
181
|
# Build a Job from a polled record, or nil for a record that carries no job.
|
|
174
182
|
#
|
|
175
183
|
# A null-value record is a tombstone / delete marker: Debezium emits these on
|
data/lib/tina4/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tina4ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.13.
|
|
4
|
+
version: 3.13.163
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tina4 Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sqlite3
|