feat(inkless:consolidation): add separate wiring for consolidation fetcher [KC-160]#635
Merged
Merged
Conversation
jeqo
force-pushed
the
jeqo/consolidation-configs
branch
2 times, most recently
from
June 5, 2026 16:40
2e291f8 to
85f2892
Compare
jeqo
marked this pull request as ready for review
June 5, 2026 16:41
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a dedicated configuration and metrics surface for the consolidation fetcher so it can be tuned and observed independently from the shared diskless consumer fetch path, while also ensuring consolidation-owned fetch resources are properly closed on broker shutdown.
Changes:
- Added
diskless.consolidation.*broker configs for consolidation fetch sizing, wait/min-bytes behavior, fetcher parallelism, and control-plane batching limits. - Wired consolidation fetch to use these new configs (fetch request sizing +
num.fetchers) and added tests validating both explicit values and defaults. - Extended the Inkless
Reader/InklessFetchMetricswiring to allow injecting a customKafkaMetricsGroupand thread-name prefix to separate consolidation metrics and thread identities.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| storage/inkless/src/main/java/io/aiven/inkless/consume/Reader.java | Adds constructor wiring for injectable metrics group + thread name prefix for consolidation-specific fetch resources. |
| storage/inkless/src/main/java/io/aiven/inkless/consume/InklessFetchMetrics.java | Allows injecting a KafkaMetricsGroup so consolidation fetch metrics can be separated in JMX. |
| server-common/src/main/java/org/apache/kafka/server/config/ServerConfigs.java | Defines new diskless.consolidation.* broker configs and defaults in CONFIG_DEF. |
| core/src/main/scala/kafka/server/KafkaConfig.scala | Exposes the new consolidation configs as KafkaConfig fields. |
| core/src/main/scala/kafka/server/ReplicaManager.scala | Creates a dedicated consolidation FetchHandler/Reader, and closes it during shutdown. |
| core/src/main/scala/io/aiven/inkless/consolidation/DisklessLeaderEndPoint.scala | Uses consolidation-specific fetch sizing/wait configs when building fetch requests. |
| core/src/main/scala/io/aiven/inkless/consolidation/ConsolidationFetcherManager.scala | Uses consolidation-specific fetcher thread count (disklessConsolidationNumFetchers). |
| core/src/test/scala/io/aiven/inkless/consolidation/DisklessLeaderEndPointTest.scala | Adds tests asserting consolidation fetch config usage and default values. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jeqo
force-pushed
the
jeqo/consolidation-configs
branch
from
June 5, 2026 16:53
85f2892 to
9bc4d46
Compare
…solidation fetcher Consolidation fetcher gets its own configuration surface independent of the shared consumer fetch path: - diskless.consolidation.fetch.max.bytes (default: 10MB, per-partition) - diskless.consolidation.fetch.response.max.bytes (default: 10MB, response-level) - diskless.consolidation.fetch.min.bytes (default: 1) - diskless.consolidation.fetch.max.wait.ms (default: 500ms) - diskless.consolidation.num.fetchers (default: 1) - diskless.consolidation.fetch.find.batches.max.per.partition (default: 0 = unlimited) - diskless.consolidation.fetch.metadata.thread.pool.size (default: 4) - diskless.consolidation.fetch.data.thread.pool.size (default: 8) Per-partition and response-level max bytes are separate configs (same pattern as replica.fetch.max.bytes vs replica.fetch.response.max.bytes) so they can be tuned independently when multiple partitions share one fetcher thread. Separate metrics group (ConsolidationFetchMetrics) so consolidation fetch metrics are distinguishable from consumer fetch metrics in JMX. Reader gains a constructor accepting KafkaMetricsGroup for injection, and InklessFetchMetrics accepts a custom metrics group. The consolidation FetchHandler constructs its own Reader with these overrides wired from KafkaConfig, with its own thread pools (smaller than consumer fetch since consolidation is background work), and is properly closed during broker shutdown. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jeqo
force-pushed
the
jeqo/consolidation-configs
branch
from
June 5, 2026 19:36
9bc4d46 to
42b611d
Compare
…for consolidation fetcher
viktorsomogyi
approved these changes
Jun 9, 2026
jeqo
added a commit
that referenced
this pull request
Jun 10, 2026
…tcher [KC-160] (#635) Consolidation fetcher gets its own configuration surface independent of the shared consumer fetch path: - diskless.consolidation.fetch.max.bytes (default: 1MB, per-partition) - diskless.consolidation.fetch.response.max.bytes (default: 10MB, response-level) - diskless.consolidation.fetch.min.bytes (default: 1) - diskless.consolidation.fetch.max.wait.ms (default: 500ms) - diskless.consolidation.num.fetchers (default: 1) - diskless.consolidation.fetch.find.batches.max.per.partition (default: 0 = unlimited) Per-partition and response-level max bytes are separate configs (same pattern as replica.fetch.max.bytes vs replica.fetch.response.max.bytes) so they can be tuned independently when multiple partitions share one fetcher thread. Separate metrics group (ConsolidationFetchMetrics) so consolidation fetch metrics are distinguishable from consumer fetch metrics in JMX. Reader gains a constructor accepting KafkaMetricsGroup for injection, and InklessFetchMetrics accepts a custom metrics group. The consolidation FetchHandler constructs its own Reader with these overrides wired from KafkaConfig, and is properly closed during broker shutdown. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
jeqo
added a commit
that referenced
this pull request
Jun 10, 2026
…tcher [KC-160] (#635) Consolidation fetcher gets its own configuration surface independent of the shared consumer fetch path: - diskless.consolidation.fetch.max.bytes (default: 1MB, per-partition) - diskless.consolidation.fetch.response.max.bytes (default: 10MB, response-level) - diskless.consolidation.fetch.min.bytes (default: 1) - diskless.consolidation.fetch.max.wait.ms (default: 500ms) - diskless.consolidation.num.fetchers (default: 1) - diskless.consolidation.fetch.find.batches.max.per.partition (default: 0 = unlimited) Per-partition and response-level max bytes are separate configs (same pattern as replica.fetch.max.bytes vs replica.fetch.response.max.bytes) so they can be tuned independently when multiple partitions share one fetcher thread. Separate metrics group (ConsolidationFetchMetrics) so consolidation fetch metrics are distinguishable from consumer fetch metrics in JMX. Reader gains a constructor accepting KafkaMetricsGroup for injection, and InklessFetchMetrics accepts a custom metrics group. The consolidation FetchHandler constructs its own Reader with these overrides wired from KafkaConfig, and is properly closed during broker shutdown. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consolidation fetcher gets its own configuration surface independent of the shared consumer fetch path:
Per-partition and response-level max bytes are separate configs (same pattern as replica.fetch.max.bytes vs replica.fetch.response.max.bytes) so they can be tuned independently when multiple partitions share one fetcher thread.
Separate metrics group (ConsolidationFetchMetrics) so consolidation fetch metrics are distinguishable from consumer fetch metrics in JMX.
Reader gains a constructor accepting KafkaMetricsGroup for injection, and InklessFetchMetrics accepts a custom metrics group. The consolidation FetchHandler constructs its own Reader with these overrides wired from KafkaConfig, and is properly closed during broker shutdown.