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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15151f90c7170c25e2174fdf43bbf5c847c65478b082dd5bdbda8049a5b57b97
4
- data.tar.gz: a040ce2ecad0cfe976a1eb579c001e07c4f9f27244f8c1e35591ba1b536ea8cc
3
+ metadata.gz: 34f4ce86795d403ce1236cfcdd459faa59f11fd43f7cf9d3a9a3dc9d13ec5209
4
+ data.tar.gz: 1a613e2d130a451750e228b99daf2e33bba88b5378bdd5ccb83cd99f1fbc05c7
5
5
  SHA512:
6
- metadata.gz: e1a7d0ff48f5310c2ee54a8d33c78bdfdcbdb1480a7633136cbde22cdea58c2e8b4f27845d1a21a14c79e4f4789c8b9fc009ec0bd61026a639ee0842598279c4
7
- data.tar.gz: 1bead80a66a17fe802aac1efdd010695e884966c0b6848bfe18d6892899bd6f48e0854303afb67f303532649302201eb85ffcee7308b2cef304e2cd03f9ae2e4
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 = nil
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
@@ -7,5 +7,5 @@
7
7
 
8
8
 
9
9
  module Tina4
10
- VERSION = "3.13.162"
10
+ VERSION = "3.13.163"
11
11
  end
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.162
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-12 00:00:00.000000000 Z
11
+ date: 2026-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sqlite3