waterdrop 2.10.0 → 2.10.1

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: 5a840a99425c1700eb3ea2cad5da08279e11ba0f4a2600b046dcef14bca9255b
4
- data.tar.gz: 6107f58c3ed66912e56379660a021eb87c1e18a0d7fee7702460c1e90b75fea3
3
+ metadata.gz: 9574fc03b9e00ef31c260706c2bb48022f909709deeae51e4a952e38ab177256
4
+ data.tar.gz: a0b49f8634f64d744162330488cefec6472e60123d472e266a362897212673ad
5
5
  SHA512:
6
- metadata.gz: 454ff01bc3baa3c2b47c46c6538dd8310c3b2af10cafe3551f00630e78d5980b7afeec7eb2047f769b24d0d6106aba4366e04e99d91045154a4ddb0b34edd4b1
7
- data.tar.gz: '0980ac5585f18983d4d6918f99cf8bf070160d5c99964459c714b532195d74372785dd9b3e40366fae709f92aea9c364e2b71d33c3ffadde0528f60e863d8348'
6
+ metadata.gz: 6bd10b69a26441486c2cb95ba75fb986372df75e38612c6cdf3a13a1f22fb9cb06dcfe8eb7c13fb31891c9a0d656bba48374cd194af7a676c42a7f44ec402ff7
7
+ data.tar.gz: d6378265af2d9bff9d8acbda9ade3500d744a31f377e95b7129aa18711c3e673a5b61d147b1d2308fd44d6ac4db8958311cb57427fb97b31e2b29a2c3e2d8943
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 4.0.3
1
+ 4.0.4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # WaterDrop changelog
2
2
 
3
+ ## 2.10.1 (2026-05-25)
4
+ - [Fix] Prevent `Producer#close` from raising `ThreadError: can't be called from trap context` when invoked from a Ruby signal trap context (e.g. Puma's `after_stopped` DSL hook in single mode). `close` now detects this case and delegates to a background thread, joining it so the caller blocks until the producer is fully closed (#866).
5
+
3
6
  ## 2.10.0 (2026-05-07)
4
7
  - [Fix] Clean up native rdkafka client, global instrumentation callbacks, and poller registration when `init_transactions` fails during producer client construction. Previously, each failed attempt permanently leaked native threads, pipe file descriptors, and callback registry entries because the started `rd_kafka_t` handle was abandoned without being destroyed.
5
8
  - **[Breaking]** Skip emitting librdkafka statistics when nothing is subscribed to `statistics.emitted` at the time the underlying rdkafka client is constructed. When no listener is present at build time, `statistics.interval.ms` is forced to `0` regardless of user configuration and the statistics callback is not registered, saving substantial allocations in the hot path (no JSON parsing, no statistics hash materialization, no decoration work). To use statistics, subscribe a listener to `statistics.emitted` BEFORE the first producer use (before the underlying client is lazily initialized).
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- waterdrop (2.10.0)
4
+ waterdrop (2.10.1)
5
5
  karafka-core (>= 2.5.12, < 3.0.0)
6
6
  karafka-rdkafka (>= 0.24.0)
7
7
  zeitwerk (~> 2.3)
@@ -16,11 +16,11 @@ GEM
16
16
  drb (2.2.3)
17
17
  ffi (1.17.4)
18
18
  io-console (0.8.2)
19
- json (2.19.3)
20
- karafka-core (2.5.12)
19
+ json (2.19.5)
20
+ karafka-core (2.5.13)
21
21
  karafka-rdkafka (>= 0.20.0)
22
22
  logger (>= 1.6.0)
23
- karafka-rdkafka (0.25.0)
23
+ karafka-rdkafka (0.27.0)
24
24
  ffi (~> 1.17.1)
25
25
  json (> 2.0)
26
26
  logger
@@ -35,7 +35,7 @@ GEM
35
35
  ruby2_keywords (>= 0.0.5)
36
36
  ostruct (0.6.3)
37
37
  prism (1.9.0)
38
- rake (13.3.1)
38
+ rake (13.4.2)
39
39
  reline (0.6.3)
40
40
  io-console (~> 0.5)
41
41
  ruby2_keywords (0.0.5)
@@ -45,7 +45,7 @@ GEM
45
45
  simplecov_json_formatter (~> 0.1)
46
46
  simplecov-html (0.13.2)
47
47
  simplecov_json_formatter (0.1.4)
48
- warning (1.5.0)
48
+ warning (1.6.0)
49
49
  zeitwerk (2.7.5)
50
50
 
51
51
  PLATFORMS
@@ -69,23 +69,23 @@ CHECKSUMS
69
69
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
70
70
  ffi (1.17.4) sha256=bcd1642e06f0d16fc9e09ac6d49c3a7298b9789bcb58127302f934e437d60acf
71
71
  io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
72
- json (2.19.3) sha256=289b0bb53052a1fa8c34ab33cc750b659ba14a5c45f3fcf4b18762dc67c78646
73
- karafka-core (2.5.12) sha256=57cbb45a187fbe3df9b9a57af59dda7211f9969524b2afbb83792a64705860e1
74
- karafka-rdkafka (0.25.0) sha256=67b316b942cf9ff7e9d7bbf9029e6f2d91eba97b4c9dc93b9f49fd207dfb80f8
72
+ json (2.19.5) sha256=218a18553e4801d579ca7e0f5bc72bafd776d7397238a1fb4e74db5b0a812c59
73
+ karafka-core (2.5.13) sha256=0acec083043bb6166c4b647a7458091cc7b08066d3b92a026932925ec7e07f61
74
+ karafka-rdkafka (0.27.0) sha256=6a74bae8bdf189af81ad5b2ed374d1ebbf9dc6c785f21e72a5f4c8211275b1ee
75
75
  logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
76
76
  mini_portile2 (2.8.9) sha256=0cd7c7f824e010c072e33f68bc02d85a00aeb6fce05bb4819c03dfd3c140c289
77
77
  minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
78
78
  mocha (3.1.0) sha256=75f42d69ebfb1f10b32489dff8f8431d37a418120ecdfc07afe3bc183d4e1d56
79
79
  ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
80
80
  prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
81
- rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
81
+ rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
82
82
  reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
83
83
  ruby2_keywords (0.0.5) sha256=ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef
84
84
  simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
85
85
  simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
86
86
  simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
87
- warning (1.5.0) sha256=0f12c49fea0c06757778eefdcc7771e4fd99308901e3d55c504d87afdd718c53
88
- waterdrop (2.10.0)
87
+ warning (1.6.0) sha256=a49cdfae19fb77d19afff2efbe45f8ab759e9cd25b4e4ce2c79dbaf46bdb6c9e
88
+ waterdrop (2.10.1)
89
89
  zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd
90
90
 
91
91
  BUNDLED WITH
@@ -18,7 +18,7 @@ services:
18
18
  start_period: 90s
19
19
 
20
20
  kafka-oauth:
21
- image: confluentinc/cp-kafka:8.2.0
21
+ image: confluentinc/cp-kafka:8.2.1
22
22
  container_name: kafka-oauth
23
23
  depends_on:
24
24
  keycloak:
@@ -1,6 +1,6 @@
1
1
  services:
2
2
  kafka-sasl:
3
- image: confluentinc/cp-kafka:8.2.0
3
+ image: confluentinc/cp-kafka:8.2.1
4
4
  container_name: kafka-sasl
5
5
  ports:
6
6
  - "9095:9095"
data/docker-compose.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  services:
2
2
  kafka:
3
3
  container_name: kafka
4
- image: confluentinc/cp-kafka:8.2.0
4
+ image: confluentinc/cp-kafka:8.2.1
5
5
 
6
6
  ports:
7
7
  - 9092:9092
@@ -423,6 +423,20 @@ module WaterDrop
423
423
  end
424
424
  end
425
425
  end
426
+ rescue ThreadError => e
427
+ # Ruby raises ThreadError with this specific message when Mutex#synchronize (or #lock) is
428
+ # called from a signal trap context. There is no public Ruby API to detect trap context
429
+ # proactively - Thread.current is the same object as the main thread, its status is "run",
430
+ # and caller_locations contains no "trap" frame. The only observable difference is that
431
+ # blocking mutex operations raise this error. We re-raise anything else (e.g.
432
+ # "deadlock; recursive locking") so those are not silently swallowed.
433
+ #
434
+ # Puma's `after_stopped` DSL hook in single mode is one example that fires in trap context.
435
+ # We escape by delegating to a background thread and joining so the caller blocks until the
436
+ # producer is fully closed.
437
+ raise unless e.message == "can't be called from trap context"
438
+
439
+ Thread.new { close(force: force) }.value
426
440
  end
427
441
 
428
442
  # Closes the producer with forced close after timeout, purging any outgoing data
@@ -3,5 +3,5 @@
3
3
  # WaterDrop library
4
4
  module WaterDrop
5
5
  # Current WaterDrop version
6
- VERSION = "2.10.0"
6
+ VERSION = "2.10.1"
7
7
  end
data/package-lock.json CHANGED
@@ -286,9 +286,9 @@
286
286
  }
287
287
  },
288
288
  "node_modules/smol-toml": {
289
- "version": "1.6.0",
290
- "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.0.tgz",
291
- "integrity": "sha512-4zemZi0HvTnYwLfrpk/CF9LOd9Lt87kAt50GnqhMpyF9U3poDAP2+iukq2bZsO/ufegbYehBkqINbsWxj4l4cw==",
289
+ "version": "1.6.1",
290
+ "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.6.1.tgz",
291
+ "integrity": "sha512-dWUG8F5sIIARXih1DTaQAX4SsiTXhInKf1buxdY9DIg4ZYPZK5nGM1VRIYmEbDbsHt7USo99xSLFu5Q1IqTmsg==",
292
292
  "dev": true,
293
293
  "license": "BSD-3-Clause",
294
294
  "engines": {
@@ -312,9 +312,9 @@
312
312
  }
313
313
  },
314
314
  "node_modules/yaml": {
315
- "version": "2.8.2",
316
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz",
317
- "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==",
315
+ "version": "2.8.4",
316
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.4.tgz",
317
+ "integrity": "sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==",
318
318
  "dev": true,
319
319
  "license": "ISC",
320
320
  "bin": {
data/renovate.json CHANGED
@@ -39,7 +39,8 @@
39
39
  "ruby/setup-ruby",
40
40
  "ruby"
41
41
  ],
42
- "groupName": "ruby setup"
42
+ "groupName": "ruby setup",
43
+ "internalChecksFilter": "strict"
43
44
  }
44
45
  ],
45
46
  "minimumReleaseAge": "7 days",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waterdrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.0
4
+ version: 2.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  requirements: []
163
- rubygems_version: 4.0.6
163
+ rubygems_version: 4.0.10
164
164
  specification_version: 4
165
165
  summary: Kafka messaging made easy!
166
166
  test_files: []