karafka-rdkafka 0.13.1 → 0.13.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +4 -0
- data/lib/rdkafka/native_kafka.rb +15 -1
- data/lib/rdkafka/version.rb +3 -3
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d216b3535772b9039cb4f81113f75b1f1262052282c3bb159c78095cddccf3a
|
4
|
+
data.tar.gz: ce7e3a921cd0c4a0da1b1d00c4af672949445b0ed05e325c975a3b8533e8a134
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5acb41af183c6a101c5b7bc88166573c22f2e84516d060b1afb78c6d958b44ffc1b13bcdb08fd8891f16c16ebd6acdabea6c51131d58c30c93e86fe7e3f714dd
|
7
|
+
data.tar.gz: a8daa33c897782dfb3875e9e8be078f40ed40a97c926c809f9cb349689d78d1fdeec8bfb70ca1e7a88dadade9f70dcd74ece2e647c30ed3fb855a4dfb3495aa7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
data/lib/rdkafka/native_kafka.rb
CHANGED
@@ -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)
|
data/lib/rdkafka/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Rdkafka
|
4
|
-
VERSION = "0.13.
|
5
|
-
LIBRDKAFKA_VERSION = "2.
|
6
|
-
LIBRDKAFKA_SOURCE_SHA256 = "
|
4
|
+
VERSION = "0.13.2"
|
5
|
+
LIBRDKAFKA_VERSION = "2.1.1"
|
6
|
+
LIBRDKAFKA_SOURCE_SHA256 = "7be1fc37ab10ebdc037d5c5a9b35b48931edafffae054b488faaff99e60e0108"
|
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.
|
4
|
+
version: 0.13.2
|
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-
|
38
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: ffi
|
metadata.gz.sig
CHANGED
Binary file
|