Skip to content

feat(inkless): POD-2394 Implement read path for consolidated logs#583

Merged
jeqo merged 7 commits intomainfrom
svv/ts-unification-consume
Apr 29, 2026
Merged

feat(inkless): POD-2394 Implement read path for consolidated logs#583
jeqo merged 7 commits intomainfrom
svv/ts-unification-consume

Conversation

@viktorsomogyi
Copy link
Copy Markdown
Contributor

Consolidated read will be done by prioritizing local logs whenever possible. This means that if the log is consolidating and if the fetched offset falls in the local offset space, meaning fetched offset < localLog.logEndOffset, then read from local logs. Otherwise read from diskless.

In case of diskless partitions that aren't consolidaing, read should be decided based on disklessStartOffset. That means that if there is a diskless offset, then read from the diskless offsets, otherwise read from the local log.

@viktorsomogyi viktorsomogyi marked this pull request as ready for review April 27, 2026 17:11
@jeqo jeqo requested a review from Copilot April 27, 2026 17:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements consolidated-log read routing for inkless/diskless topics by preferring local UnifiedLog reads for consolidating partitions when the requested fetch offset is within the locally-available offset range, otherwise falling back to the diskless fetch path.

Changes:

  • Update ReplicaManager.fetchMessages diskless routing to use local LEO for consolidating topics (when consolidation is enabled).
  • Add unit tests covering consolidating vs non-consolidating diskless fetch routing decisions.
  • Extend the consolidated diskless topics integration test to consume produced records and verify end-to-end readability.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
core/src/main/scala/kafka/server/ReplicaManager.scala Adjusts diskless fetch routing logic to prioritize local reads for consolidating partitions based on local log end offset.
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala Adds unit tests validating the new consolidating-diskless routing behavior (local vs diskless).
core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java Adds a consumer verification step after producing/tiering to ensure records can be read back.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread core/src/main/scala/kafka/server/ReplicaManager.scala Outdated
Comment thread core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java Outdated
Comment thread core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java Outdated
Comment thread core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java Outdated
Comment thread core/src/main/scala/kafka/server/ReplicaManager.scala Outdated
Comment thread core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java Outdated
@viktorsomogyi viktorsomogyi force-pushed the svv/ts-unification-consume branch from 9de3801 to 04e9a4a Compare April 28, 2026 13:20
@viktorsomogyi
Copy link
Copy Markdown
Contributor Author

@jeqo resolved the comments, every comment is addressed in a separate commit to ease the review.

@viktorsomogyi viktorsomogyi requested a review from jeqo April 28, 2026 13:41
Copy link
Copy Markdown
Contributor

@jeqo jeqo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a minor comment on one of the tests.

Comment thread core/src/test/java/kafka/server/InklessConsolidatedDisklessTopicsTest.java Outdated
Consolidated read will be done by prioritizing local logs whenever possible.
This means that if the log is consolidating and if the fetched offset
falls in the local offset space, meaning fetched offset < localLog.logEndOffset,
then read from local logs. Otherwise read from diskless.

In case of diskless partitions that aren't consolidaing, read should be
decided based on disklessStartOffset. That means that if there is a diskless
offset, then read from the diskless offsets, otherwise read from the local log.
# Conflicts:
#	core/src/main/scala/kafka/server/ReplicaManager.scala
@viktorsomogyi viktorsomogyi force-pushed the svv/ts-unification-consume branch from 29b09e3 to 9dd62d6 Compare April 29, 2026 11:45
Copy link
Copy Markdown
Contributor

@AnatolyPopov AnatolyPopov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jeqo jeqo merged commit bd8369b into main Apr 29, 2026
5 checks passed
@jeqo jeqo deleted the svv/ts-unification-consume branch April 29, 2026 13:00
giuseppelillo pushed a commit that referenced this pull request May 7, 2026
Consolidated read will be done by prioritizing local logs whenever possible.
This means that if the log is consolidating and if the fetched offset
falls in the local offset space, meaning fetched offset < localLog.logEndOffset,
then read from local logs. Otherwise read from diskless.

In case of diskless partitions that aren't consolidaing, read should be
decided based on disklessStartOffset. That means that if there is a diskless
offset, then read from the diskless offsets, otherwise read from the local log.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants