Skip to content

feat(inkless): Support OffsetsForLeaderEpoch for partitions switched to diskless - #613

Merged
jeqo merged 1 commit into
mainfrom
giuseppelillo/hybrid-offset-for-leader-epoch
May 27, 2026
Merged

feat(inkless): Support OffsetsForLeaderEpoch for partitions switched to diskless#613
jeqo merged 1 commit into
mainfrom
giuseppelillo/hybrid-offset-for-leader-epoch

Conversation

@giuseppelillo

Copy link
Copy Markdown
Contributor

No description provided.

@giuseppelillo
giuseppelillo force-pushed the giuseppelillo/hybrid-offset-for-leader-epoch branch 2 times, most recently from 88f2337 to 29edefc Compare May 27, 2026 09:32
@giuseppelillo giuseppelillo changed the title feat(inkless): Support LastOffsetForLeader epoch for hybrid partitions feat(inkless): Support OffsetsForLeaderEpoch for partitions switched to diskless May 27, 2026
@giuseppelillo
giuseppelillo requested a review from Copilot May 27, 2026 09:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds hybrid routing for OffsetsForLeaderEpoch so partitions that are transitioning to diskless (or have just switched) can still answer epoch-offset queries correctly from the classic local log when appropriate.

Changes:

  • Refactors ReplicaManager.lastOffsetForLeaderEpoch to route requests between classic local log and diskless control-plane lookups based on classicToDisklessStartOffset.
  • Defers creation/start of the diskless FetchOffsetHandler.Job until a diskless lookup is actually needed.
  • Adds unit tests covering switch-pending and switch-boundary cases, and updates test scaffolding defaults for classicToDisklessStartOffset.

Reviewed changes

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

File Description
core/src/main/scala/kafka/server/ReplicaManager.scala Implements hybrid routing logic for OffsetsForLeaderEpoch across classic/diskless states.
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala Adds regression tests for switch-pending and switch-boundary behavior; updates metadata-view stubbing.

💡 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/main/scala/kafka/server/ReplicaManager.scala
@giuseppelillo
giuseppelillo force-pushed the giuseppelillo/hybrid-offset-for-leader-epoch branch from 29edefc to 1d8946b Compare May 27, 2026 10:04
@giuseppelillo
giuseppelillo requested a review from Copilot May 27, 2026 10:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread core/src/main/scala/kafka/server/ReplicaManager.scala
Comment thread core/src/main/scala/kafka/server/ReplicaManager.scala
@giuseppelillo
giuseppelillo force-pushed the giuseppelillo/hybrid-offset-for-leader-epoch branch from 1d8946b to c577bcf Compare May 27, 2026 10:57
@giuseppelillo
giuseppelillo requested a review from Copilot May 27, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@giuseppelillo
giuseppelillo marked this pull request as ready for review May 27, 2026 11:07
Base automatically changed from giuseppelillo/hybrid-delete-records to main May 27, 2026 15:10

@viktorsomogyi viktorsomogyi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@giuseppelillo LGTM but please rebase it on main because I see there are some commits that have been just merged. Probably they would be fine with merging but perhaps it's cleaner if they are cleaned up.

@giuseppelillo
giuseppelillo force-pushed the giuseppelillo/hybrid-offset-for-leader-epoch branch from c577bcf to d8a6a79 Compare May 27, 2026 15:23
@giuseppelillo

Copy link
Copy Markdown
Contributor Author

@giuseppelillo LGTM but please rebase it on main because I see there are some commits that have been just merged. Probably they would be fine with merging but perhaps it's cleaner if they are cleaned up.

Done

@jeqo
jeqo merged commit 03b9060 into main May 27, 2026
4 checks passed
@jeqo
jeqo deleted the giuseppelillo/hybrid-offset-for-leader-epoch branch May 27, 2026 19:33
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