karafka-rdkafka 0.13.1 → 0.13.3

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: 826f1e6186cf6d72d7d1460dc33fd1f35c884ee4e1acf8d13c720f3d5324db87
4
- data.tar.gz: 5f975ec4eac686b2f0bb21eebd0ba83a0f7162fedef65a7f7357e6172a5f6498
3
+ metadata.gz: d3052c9fc488e536f27e8c64852e65b3276e13b0aee93d04af677c3f0463b693
4
+ data.tar.gz: f792918c4e9eb3f0438e640d58b7cacb84ef9987267e859d756cf270ba9a41a0
5
5
  SHA512:
6
- metadata.gz: 1c9e89a124d065581d0a7b04ec0116ddcc752da454091ce8f0d4df473f0ceb346fae7e3d0169b4b0590222c9a36e9f79a35da6a50d379e2cb66c335690ad40fa
7
- data.tar.gz: 83066cace0c8e9e0e40cf95615db3df46c336c681d1ecb2973d81468f9eb2d106da4250fb35d893e2cc4eba3e5f05ba47baa680beba4887f16a61299499fe875
6
+ metadata.gz: ad052092d03ad48029ab824c4d803b2ecaa6ca61ea49a8a0d1f671fe1d6cc147c3874360d6df0e1b75319db9dc21c08f92c2ec075b1f2bb62e4eff856b51925f
7
+ data.tar.gz: 9aa1f6d2c7f9a7f3a5b4611b19b6cf1c2cc1419ba85f16404f266d8a66eeacc89b220abddb9eea1b98520342a963733170420d384ec9d4f2daa245d5bd02c904
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.13.3
2
+ * Bump librdkafka to 2.2.0
3
+
4
+ # 0.13.2
5
+ * Ensure operations counter decrement is fully thread-safe
6
+ * Bump librdkafka to 2.1.1
7
+
1
8
  # 0.13.1
2
9
  * Add offsets_for_times method on consumer (timflapper)
3
10
 
@@ -10,6 +10,20 @@ module Rdkafka
10
10
  @access_mutex = Mutex.new
11
11
  # Lock around internal polling
12
12
  @poll_mutex = Mutex.new
13
+ # Lock around decrementing the operations in progress counter
14
+ # We have two mutexes - one for increment (`@access_mutex`) and one for decrement mutex
15
+ # because they serve different purposes:
16
+ #
17
+ # - `@access_mutex` allows us to lock the execution and make sure that any operation within
18
+ # the `#synchronize` is the only one running and that there are no other running
19
+ # operations.
20
+ # - `@decrement_mutex` ensures, that our decrement operation is thread-safe for any Ruby
21
+ # implementation.
22
+ #
23
+ # We do not use the same mutex, because it could create a deadlock when an already
24
+ # incremented operation cannot decrement because `@access_lock` is now owned by a different
25
+ # thread in a synchronized mode and the synchronized mode is waiting on the decrement.
26
+ @decrement_mutex = Mutex.new
13
27
  # counter for operations in progress using inner
14
28
  @operations_in_progress = 0
15
29
 
@@ -45,7 +59,7 @@ module Rdkafka
45
59
 
46
60
  @inner.nil? ? raise(ClosedInnerError) : yield(@inner)
47
61
  ensure
48
- @operations_in_progress -= 1
62
+ @decrement_mutex.synchronize { @operations_in_progress -= 1 }
49
63
  end
50
64
 
51
65
  def synchronize(&block)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rdkafka
4
- VERSION = "0.13.1"
5
- LIBRDKAFKA_VERSION = "2.0.2"
6
- LIBRDKAFKA_SOURCE_SHA256 = "f321bcb1e015a34114c83cf1aa7b99ee260236aab096b85c003170c90a47ca9d"
4
+ VERSION = "0.13.3"
5
+ LIBRDKAFKA_VERSION = "2.2.0"
6
+ LIBRDKAFKA_SOURCE_SHA256 = "af9a820cbecbc64115629471df7c7cecd40403b6c34bfdbb9223152677a47226"
7
7
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-rdkafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.13.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thijs Cadier
@@ -35,7 +35,7 @@ cert_chain:
35
35
  Qf04B9ceLUaC4fPVEz10FyobjaFoY4i32xRto3XnrzeAgfEe4swLq8bQsR3w/EF3
36
36
  MGU0FeSV2Yj7Xc2x/7BzLK8xQn5l7Yy75iPF+KP3vVmDHnNl
37
37
  -----END CERTIFICATE-----
38
- date: 2023-06-26 00:00:00.000000000 Z
38
+ date: 2023-07-13 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: ffi
metadata.gz.sig CHANGED
Binary file