Skip to content

fix(inkless): repair missing control-plane rows on CreatePartitions retry [KC-420] - #752

Merged
viktorsomogyi merged 4 commits into
mainfrom
svv/fix-create-partitions-missing-logs-rows
Aug 18, 2026
Merged

viktorsomogyi merged 4 commits into
mainfrom
svv/fix-create-partitions-missing-logs-rows

Conversation

@viktorsomogyi

Copy link
Copy Markdown
Contributor

A failed control-plane write after KRaft already applied the increase left partitions advertised but unusable; retry returned INVALID_PARTITIONS and skipped the insert. Also treat a diskless LATEST below the committed seal as the seal, so a placeholder row cannot truncate the classic prefix.

@viktorsomogyi
viktorsomogyi force-pushed the svv/fix-create-partitions-missing-logs-rows branch from 370f426 to 7e6c736 Compare August 14, 2026 13:43
@viktorsomogyi
viktorsomogyi requested a lite review from Copilot August 14, 2026 13:44

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

This PR hardens Inkless diskless-topic partition creation and consolidation behavior by making CreatePartitions retries repair missing control-plane rows and by preventing placeholder control-plane LATEST offsets from incorrectly truncating classic prefixes below the committed KRaft seal.

Changes:

  • Update controller CreatePartitions handling to generate control-plane insert requests for “born-diskless” partitions on retries, including non-contiguous ranges and skipping sealed/switching partitions when the image indicates them.
  • Clamp diskless LATEST offsets (and epoch end offsets derived from LATEST) to at least the committed seal to avoid truncation from placeholder rows.
  • Expand unit test coverage for both behaviors across controller and diskless leader endpoint paths.

Reviewed changes

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

Show a summary per file
File Description
storage/inkless/src/main/java/io/aiven/inkless/control_plane/CreateTopicAndPartitionsRequest.java Updates API documentation to reflect range-based partition insertion semantics for retries/holes.
core/src/main/scala/kafka/server/ControllerApis.scala Implements retry-aware control-plane row insertion, including partition classification and contiguous range batching.
core/src/test/scala/unit/kafka/server/ControllerApisTest.scala Adds tests covering CreatePartitions retry scenarios, sealed/switching skips, non-contiguous insertion, and decrease rejection.
core/src/main/scala/io/aiven/inkless/consolidation/DisklessLeaderEndPoint.scala Ensures LATEST-derived offsets are never below the committed seal and keeps leader epoch resolution consistent with the adjusted offset.
core/src/test/scala/io/aiven/inkless/consolidation/DisklessLeaderEndPointTest.scala Adds tests validating seal clamping behavior for LATEST and for epoch end offsets.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread core/src/main/scala/kafka/server/ControllerApis.scala Outdated
…etry

A failed control-plane write after KRaft already applied the increase left
partitions advertised but unusable; retry returned INVALID_PARTITIONS and
skipped the insert. Also treat a diskless LATEST below the committed seal
as the seal, so a placeholder row cannot truncate the classic prefix.

Co-authored-by: Cursor <cursoragent@cursor.com>
@viktorsomogyi
viktorsomogyi force-pushed the svv/fix-create-partitions-missing-logs-rows branch from 7e6c736 to 9f28516 Compare August 14, 2026 13:54
@viktorsomogyi viktorsomogyi changed the title fix(inkless): repair missing control-plane rows on CreatePartitions retry fix(inkless): repair missing control-plane rows on CreatePartitions retry [KC-420] Aug 14, 2026
@viktorsomogyi
viktorsomogyi marked this pull request as ready for review August 14, 2026 14:36
@viktorsomogyi
viktorsomogyi requested a review from jeqo August 14, 2026 14:36

@jeqo jeqo 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.

Looking good. Left a few comments before approving.

Comment thread core/src/test/scala/unit/kafka/server/ControllerApisTest.scala
Comment thread core/src/main/scala/kafka/server/ControllerApis.scala Outdated
Comment thread core/src/main/scala/kafka/server/ControllerApis.scala Outdated
viktorsomogyi and others added 3 commits August 18, 2026 13:21
…s writes

CreatePartitions never returns that error; it was copied from create-topic.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ification

The decrease check and the born-diskless filter must see the same snapshot.

Co-authored-by: Cursor <cursoragent@cursor.com>
… or equal

Switch-pending and born-diskless must not raise LATEST; equality with the seal is already correct.

Co-authored-by: Cursor <cursoragent@cursor.com>
@viktorsomogyi
viktorsomogyi merged commit 297bbf5 into main Aug 18, 2026
6 checks passed
@viktorsomogyi
viktorsomogyi deleted the svv/fix-create-partitions-missing-logs-rows branch August 18, 2026 12:05
jeqo pushed a commit that referenced this pull request Aug 19, 2026
…etry [KC-420] (#752)

* fix(inkless): repair missing control-plane rows on CreatePartitions retry

A failed control-plane write after KRaft already applied the increase left
partitions advertised but unusable; retry returned INVALID_PARTITIONS and
skipped the insert. Also treat a diskless LATEST below the committed seal
as the seal, so a placeholder row cannot truncate the classic prefix.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
jeqo pushed a commit that referenced this pull request Aug 19, 2026
…etry [KC-420] (#752)

* fix(inkless): repair missing control-plane rows on CreatePartitions retry

A failed control-plane write after KRaft already applied the increase left
partitions advertised but unusable; retry returned INVALID_PARTITIONS and
skipped the insert. Also treat a diskless LATEST below the committed seal
as the seal, so a placeholder row cannot truncate the classic prefix.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
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