karafka-web 0.7.9 → 0.7.10

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: 24bc5fe488a1304886f3f7f697a8662463f4c21fae60daf52d317852f9f43669
4
- data.tar.gz: eaa8e4b7d9b9d70200c8929e8fa65ed7906a1b4085465b15525bfee670ebbcc9
3
+ metadata.gz: '0806cac6cd5ba083c727f4737a5bacbc6fb51a45229043745e401c3f5ccfd120'
4
+ data.tar.gz: f6f5743e8fe1b32eec5c126f81d8ed4bcb0501569c050b721a238388d608a7aa
5
5
  SHA512:
6
- metadata.gz: 0ba2c668103a3b25169d86f2c0624fae04d144694040694ff79c4932bf81fe648e5ba11223be5a5f9e8d8ba0bbbac9da84f2ec5312e81d07b35873707b7b754c
7
- data.tar.gz: b0ec51820b50dfde4f88e942e3b0dcc2400170d0fbe256503294f366e2f4fe0057249bb525528b789bed254ba6ec035d5502e515042bd094999663155f8a221d
6
+ metadata.gz: a70b5779abaa3440ffb85f8d735edf6a96723ab08c0c52a982c3ac09331d4a459053de0fcf4767bd79631d0314efe9d3a13949639d1b2ee62f88cda6e6519dbb
7
+ data.tar.gz: 2ab8bc6927e8e5d0cf6ef63e2be932322eeec8d0f668c7a144b61d5dfc3ceae74a758dcd58f32deac4ccf42c4cad1d799e7df4f5c0b0bbb0494b245362104262
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,6 +1,8 @@
1
1
  name: ci
2
2
 
3
- concurrency: ci-${{ github.ref }}
3
+ concurrency:
4
+ group: ${{ github.workflow }}-${{ github.ref }}
5
+ cancel-in-progress: true
4
6
 
5
7
  on:
6
8
  pull_request:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Karafka Web changelog
2
2
 
3
+ ## 0.7.10 (2023-10-31)
4
+ - [Fix] Max LSO chart does not work as expected (#201)
5
+
3
6
  ## 0.7.9 (2023-10-25)
4
7
  - [Enhancement] Allow for `Karafka::Web.producer` reconfiguration from the default (`Karafka.producer`).
5
8
  - [Change] Rely on `karafka-core` `>=` `2.2.4` to support lazy loaded custom web producer.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka-web (0.7.9)
4
+ karafka-web (0.7.10)
5
5
  erubi (~> 1.4)
6
6
  karafka (>= 2.2.9, < 3.0.0)
7
7
  karafka-core (>= 2.2.4, < 3.0.0)
@@ -107,9 +107,18 @@ module Karafka
107
107
 
108
108
  # Last stable offsets freeze durations - we pick the max freeze to indicate
109
109
  # the longest open transaction that potentially may be hanging
110
- ls_offsets_fd = partitions_data
111
- .map { |p_details| p_details.fetch(:ls_offset_fd, 0) }
112
- .reject(&:negative?)
110
+ # We select only those partitions for which LSO != HO as in any other case this
111
+ # just means we've reached the end of data and ls may freeze because there is no
112
+ # more data flowing. Such cases should not be reported as ls offset freezes because
113
+ # there is no more data to be processed and can grow until more data is present
114
+ # this does not indicate "bad" freezing that we are interested in
115
+ ls_offsets_fds = partitions_data.map do |p_details|
116
+ next if p_details.fetch(:ls_offset, 0) == p_details.fetch(:hi_offset, 0)
117
+
118
+ ls_offset_fd = p_details.fetch(:ls_offset_fd, 0)
119
+
120
+ ls_offset_fd.negative? ? nil : ls_offset_fd
121
+ end
113
122
 
114
123
  cgs[group_name] ||= {}
115
124
  cgs[group_name][topic_name] = {
@@ -119,7 +128,7 @@ module Karafka
119
128
  # Take max last stable offset duration without any change. This can
120
129
  # indicate a hanging transaction, because the offset will not move forward
121
130
  # and will stay with a growing freeze duration when stuck
122
- ls_offset_fd: ls_offsets_fd.max || 0
131
+ ls_offset_fd: ls_offsets_fds.compact.max || 0
123
132
  }
124
133
  end
125
134
 
@@ -76,20 +76,11 @@ module Karafka
76
76
  topic_without_cg = topic.split('[').first
77
77
 
78
78
  metrics.each do |current|
79
- ls_offset = current.last[:ls_offset] || 0
80
79
  ls_offset_fd = current.last[:ls_offset_fd] || 0
81
- hi_offset = current.last[:hi_offset] || 0
82
80
 
83
81
  # We convert this to seconds from milliseconds due to our Web UI precision
84
82
  # Reporting is in ms for consistency
85
83
  normalized_fd = (ls_offset_fd / 1_000).round
86
- # In case ls_offset and hi_offset are the same, it means we're reached eof
87
- # and we just don't have more data. In cases like this, LSO freeze duration
88
- # will grow because LSO will remain unchanged, but it does not mean it is
89
- # frozen. It means there is just no more data in the topic partition
90
- # This means we need to nullify this case, otherwise it would report, that
91
- # lso is hanging.
92
- normalized_fd = 0 if ls_offset == hi_offset
93
84
 
94
85
  topics[topic_without_cg][current.first] << normalized_fd
95
86
  end
@@ -3,6 +3,6 @@
3
3
  module Karafka
4
4
  module Web
5
5
  # Current gem version
6
- VERSION = '0.7.9'
6
+ VERSION = '0.7.10'
7
7
  end
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.9
4
+ version: 0.7.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -35,7 +35,7 @@ cert_chain:
35
35
  AnG1dJU+yL2BK7vaVytLTstJME5mepSZ46qqIJXMuWob/YPDmVaBF39TDSG9e34s
36
36
  msG3BiCqgOgHAnL23+CN3Rt8MsuRfEtoTKpJVcCfoEoNHOkc
37
37
  -----END CERTIFICATE-----
38
- date: 2023-10-25 00:00:00.000000000 Z
38
+ date: 2023-10-31 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: erubi
metadata.gz.sig CHANGED
Binary file