Skip to content

feat(inkless): fast fail producing during classic-to-diskless migration#595

Merged
giuseppelillo merged 1 commit into
mainfrom
EelisK/POD-2453
May 15, 2026
Merged

feat(inkless): fast fail producing during classic-to-diskless migration#595
giuseppelillo merged 1 commit into
mainfrom
EelisK/POD-2453

Conversation

@EelisK
Copy link
Copy Markdown
Member

@EelisK EelisK commented May 13, 2026

Currently, producing messages to partitions mid-migration causes UNKNOWN_TOPIC_OR_PARTITION errors, which can be misleading for producers. This commit changes the behaviour by filtering out partitions that are being migrated, and responding with REPLICA_NOT_AVAILABLE for those.

Currently, producing messages to partitions mid-migration causes
`UNKNOWN_TOPIC_OR_PARTITION` errors, which can be misleading for
producers. This commit changes the behaviour by filtering out partitions
that are being migrated, and responding with `REPLICA_NOT_AVAILABLE` for
those.
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

This PR adjusts produce (append) behavior for diskless topics during classic-to-diskless migration so that partitions in the “migration pending” state fail fast with REPLICA_NOT_AVAILABLE (instead of surfacing misleading UNKNOWN_TOPIC_OR_PARTITION outcomes).

Changes:

  • In ReplicaManager.appendRecords, split diskless produce entries into “pending migration” vs “ready” and exclude pending partitions from the diskless append handler.
  • Return REPLICA_NOT_AVAILABLE per-partition responses for “migration pending” partitions while still producing to other ready diskless partitions and/or classic partitions.
  • Add unit tests covering pending-only, mixed pending+ready, handler failure, and mixed pending+classic scenarios.

Reviewed changes

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

File Description
core/src/main/scala/kafka/server/ReplicaManager.scala Filters diskless produce entries that are CLASSIC_TO_DISKLESS_MIGRATION_PENDING and returns REPLICA_NOT_AVAILABLE for them, while sending only ready diskless partitions to AppendHandler.
core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala Adds test coverage ensuring pending-migration partitions return REPLICA_NOT_AVAILABLE and that ready partitions/classic partitions behave as expected (including handler failure fallback).

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

@EelisK EelisK marked this pull request as ready for review May 15, 2026 07:32
@giuseppelillo giuseppelillo merged commit 8387b7f into main May 15, 2026
13 of 14 checks passed
@giuseppelillo giuseppelillo deleted the EelisK/POD-2453 branch May 15, 2026 09:33
giuseppelillo pushed a commit that referenced this pull request May 15, 2026
…on (#595)

Currently, producing messages to partitions mid-migration causes
`UNKNOWN_TOPIC_OR_PARTITION` errors, which can be misleading for
producers. This commit changes the behaviour by filtering out partitions
that are being migrated, and responding with `REPLICA_NOT_AVAILABLE` for
those.
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.

3 participants