Skip to content

Releases: karafka/karafka-core

v2.5.13

08 Apr 09:34
4ce84e0

Choose a tag to compare

  • [Enhancement] Extract decorate_partitions method from StatisticsDecorator to allow subclasses to filter which partitions are decorated (e.g. skip unassigned partitions in a consumer context).

v2.5.12

02 Apr 17:29
5384f09

Choose a tag to compare

  • [Fix] Exclude test/ directory from gem releases to reduce package size.

v2.5.11

02 Apr 10:32
035ab48

Choose a tag to compare

  • [Enhancement] Specialize Contract#dig for common 1-key and 2-key paths to avoid iterator overhead, yielding ~1.5x faster single-key lookups and ~1.45x faster two-key nested lookups.
  • [Enhancement] Replace Node#build_accessors @local_defs Array with Hash for O(1) membership checks instead of O(n) Array#include?, yielding up to ~5x faster accessor lookups at 50 settings.
  • [Enhancement] Use frozen EMPTY_ARRAY constant for Contract#call and #validate! default scope parameter to avoid allocating a new Array on every invocation, yielding ~1.36x faster call dispatch and saving 1 Array allocation per call.
  • [Enhancement] Pre-resolve @events_methods_map method name before the listener notification loop in Notifications#instrument to avoid repeated Hash lookup per listener, yielding ~1.12x faster event dispatch with multiple listeners.
  • [Enhancement] Cache a frozen success Result singleton via Result.success to eliminate 1 object allocation per successful Contract#call on the happy path.
  • [Enhancement] Skip nestings block re-evaluation in Node#deep_dup to avoid recreating children that are immediately overwritten, yielding ~14x faster deep_dup and reducing allocations from ~620 to ~66 objects for large configs.
  • [Enhancement] Cache CallbacksManager#call values snapshot and invalidate on add/delete to avoid allocating a new Array on every invocation while preserving thread-safety snapshot semantics, saving 1 Array allocation per call.
  • [Enhancement] Store execution time separately in Event and build the merged payload hash lazily on #payload access, eliminating 1 Hash allocation per Notifications#instrument call when listeners use #[] access (the common pattern), yielding ~1.7x faster event dispatch.
  • [Enhancement] Replace StatisticsDecorator#diff pending-writes buffer with keys.each direct-write iteration, eliminating the buffer and write-back loop for ~13% faster decoration at scale (10 brokers, 20 topics, 2000 partitions).
  • [Enhancement] Reorder StatisticsDecorator#diff type checks to test Numeric before Hash, matching the ~80% numeric value distribution in librdkafka statistics.
  • [Enhancement] Support only_keys option in StatisticsDecorator to decorate only specified numeric keys (e.g. consumer_lag, committed_offset). When combined with excluded_keys, reduces decoration cost from ~80ms to ~8.5ms per call on large clusters (10 brokers, 20 topics, 2000 partitions) by using structure-aware navigation of the librdkafka statistics tree and direct key access instead of full-hash iteration.

v2.5.10

02 Mar 12:02
1b03a47

Choose a tag to compare

  • [Enhancement] Introduce MinitestLocator helper for minitest/spec subject class auto-discovery from test file paths.

v2.5.9

02 Mar 11:17
91dd614

Choose a tag to compare

  • [Enhancement] Optimize StatisticsDecorator to eliminate per-hash Array allocations by using each_pair with a per-call pending-writes buffer instead of current.keys.each, reducing allocations from tens of thousands to one per call at scale.
  • [Enhancement] Inline StatisticsDecorator#append and #suffix_keys_for into #diff to reduce method call overhead by ~96% (from ~915k to ~39k calls at 6400 partitions).
  • [Enhancement] Support excluded_keys option in StatisticsDecorator to skip decoration of unused librdkafka statistics subtrees (e.g. broker toppars, window stats), yielding ~28% additional speedup at scale.

v2.5.8

23 Nov 14:25
eb4a3ef

Choose a tag to compare

  • [Enhancement] Memoize StatisticsDecorator suffix keys to reduce string allocations (#268).

v2.5.7

28 Sep 15:19
3f4eb49

Choose a tag to compare

  • [Enhancement] Optimize Node#deep_dup to reduce array allocations during configuration deep copying.
  • [Enhancement] Optimize Result#initialize to use shared EMPTY_HASH constant for successful validations.
  • [Enhancement] Optimize StatisticsDecorator#append string concatenation to reduce allocations.
  • [Enhancement] Optimize Notifications#instrument payload handling to avoid unnecessary hash merges for empty payloads.
  • [Change] Remove Ruby 3.1 support due to EOL.

v2.5.6

02 Sep 07:05
c28fbcb

Choose a tag to compare

  • [Change] Normalize how libs and dependencies are required (no functional change for the end user)
  • [Change] Set minimum karafka-rdkafka on 0.20.0 to support new features and allow for open range as both waterdrop and karafka manage this.

v2.5.5

04 Aug 19:33
14054aa

Choose a tag to compare

  • [Enhancement] Remove reliance on Set class.

v2.5.4

04 Aug 12:59
314a916

Choose a tag to compare

  • [Fix] Fix old regression on misbehaviour when Object methods are overwritten.