8000 fix(inkless:switch): keep DeleteRecords below the log start from regressing EARLIEST [KC-879] by viktorsomogyi · Pull Request #916 · aiven/inkless · GitHub
[go: up one dir, main page]

Skip to content

fix(inkless:switch): keep DeleteRecords below the log start from regressing EARLIEST [KC-879] - #916

Merged
viktorsomogyi merged 4 commits into
mainfrom
svv/kc-879-delete-records-earliest-regress
Dec 2, 2026
Merged

viktorsomogyi merged 4 commits into
mainfrom
svv/kc-879-delete-records-earliest-regress

Conversation

@viktorsomogyi
@viktorsomogyi viktorsomogyi commented Nov 30, 2026 •
Copy link
Copy Markdown
Contributor

EARLIEST is COALESCE(remote_log_start_offset, log_start_offset). Before the control plane stores the first cross-tier value, a DeleteRecords request below the log start stored that lower offset. EARLIEST then moved below the first stored batch.

Summary

 advanceCrossTierLogStartOffset(request)
   if remote_log_start_offset is unset
-    remote_log_start_offset = request.offset
+    remote_log_start_offset = max(request.offset, log_start_offset)
   else if request.offset > remote_log_start_offset
     remote_log_start_offset = request.offset
   return remote_log_start_offset
storage/inkless/
├── .../InMemoryControlPlane.java          # first value never below log start, in-memory plane
├── resources/db/migration/
│   └── V33__Floor_cross_tier_log_start.sql  # same rule in advance_cross_tier_log_start_v1
└── test/.../AbstractControlPlaneTest.java   # runs against both planes
core/.../ReplicaManager.scala              # comment only

Evidence

  • Before: ListOffsets(EARLIEST) returns classicLogStart - 5 after DeleteRecords(classicLogStart - 5) on a switched log. This comes from reading the old code. I didn't run the new tests against it.
    After: it returns classicLogStart.
deleteRecordsBelowClassicStartKeepsEarliest
  advanceCrossTierLogStartOffset(classicLogStart - 5) == success(classicLogStart)
  pruneDisklessLogs(seal - 1)
  getCrossTierLogStart == classicLogStart
  listOffsets(EARLIEST) == classicLogStart

advanceBelowWalStartBeforeFirstPruneKeepsWalStart
  advanceCrossTierLogStartOffset(5) == success(10)
  listOffsets(EARLIEST) == 10

./gradlew :storage:inkless:test --tests '*InMemoryControlPlaneTest' --tests '*PostgresControlPlaneTest' passes: 232 tests, 0 failures, 0 errors, 0 skipped. Each new test runs once against InMemoryControlPlane and once against Postgres with the V33 function.

Merge Danger

Door: Two-way, with one caveat.

V33 replaces a function with CREATE OR REPLACE, so a revert needs a new migration that restores the V28 body. Rows already written aren't changed.

Blast Radius: Narrow

Only the first cross-tier advance on a log changes. Later advances stay forward-only.

Reviewers: Giuseppe Lillo giuseppe.lillo@aiven.io

@viktorsomogyi
viktorsomogyi force-pushed the svv/kc-879-delete-records-earliest-regress branch from 24ecdf0 to d78558a Compare December 1, 2026 16:01
…essing EARLIEST [KC-879]

`EARLIEST` falls back to the WAL log start until the control plane stores
the first cross-tier value. A DeleteRecords request below the log start
sends a lower offset, and storing it moved `EARLIEST` below the first
stored batch.

The control plane now clamps the first cross-tier value to the log start,
so a delete below the log start keeps `EARLIEST` unchanged. The
`advance_cross_tier_log_start_v1` function in `V33` does the same in
Postgres.

Testing

`AbstractControlPlaneTest` covers an advance below the WAL start before
the first prune and a delete below the classic log start on a switched
log.

Assisted-by: Claude Sonnet 5.5
…ion 33 [KC-879]

The `V33` migration raises the schema version from 32 to 33. The CI check
compares the committed jOOQ classes with a fresh `generateJooqClasses`
run, and it failed because the committed classes still said version 32.

Testing

`generateJooqClasses` ran as part of
`./gradlew :storage:inkless:test --tests '*InMemoryControlPlaneTest' --tests '*PostgresControlPlaneTest'`.
The diff changes only the `schema version` line in 120 files.

Assisted-by: Claude Sonnet 5.5
Several comments restated the code or each other. The Java, SQL, and
Scaladoc comments all explained the same `EARLIEST` fallback, and the
test comment repeated the test name.

Testing

`InMemoryControlPlaneTest` and `PostgresControlPlaneTest` pass, and
`make vale` reports no alerts.

Assisted-by: Claude Sonnet 5.5
@viktorsomogyi
viktorsomogyi force-pushed the svv/kc-879-delete-records-earliest-regress branch from d1812ea to d7bb395 Compare December 2, 2026 09:50
@viktorsomogyi
viktorsomogyi requested a balanced review from Copilot December 2, 2026 12:37
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.

🟢 Approval recommended

No active review issues remain for the change intended to prevent below-start DeleteRecords requests from moving EARLIEST backward.

No open issues 🎉

What changed in this PR

Prevents below-start DeleteRecords requests from moving EARLIEST backward in Inkless’s diskless control plane.

Changes:

  • Floor the first cross-tier offset at the log start in both control-plane implementations.
  • Add regression tests for diskless and switched logs, including preservation after pruning.
  • Refresh generated schema annotations and clarify the broker comment without changing broker logic.
File Description
storage/​inkless/​src/​test/​java/​io/​aiven/​inkless/​control_plane/​AbstractControlPlaneTest.java Adds below-start regression coverage.
storage/​inkless/​src/​main/​resources/​db/​migration/​V33__Floor_cross_tier_log_start.sql Floors the first cross-tier offset in PostgreSQL.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​UDTs.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​PurgeDeletedLogsResponseV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​PruneBatchesBelowHighestTieredOffsetResponseV2Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​PruneBatchesBelowHighestTieredOffsetResponseV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​PruneBatchesBelowHighestTieredOffsetRequestV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​ListOffsetsResponseV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​ListOffsetsRequestV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​InitDisklessLogResponseV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​InitDisklessLogRequestV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​InitDisklessLogProducerStateV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​FindBatchesResponseV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​FindBatchesRequestV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​EnforceRetentionResponseV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​EnforceRetentionRequestV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​DeleteRecordsResponseV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​DeleteRecordsRequestV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​CommitBatchResponseV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​CommitBatchRequestV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​BatchMetadataV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​BatchInfoV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​AdvanceCrossTierLogStartResponseV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​records/​AdvanceCrossTierLogStartRequestV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​PurgeDeletedLogsResponseV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​PruneBatchesBelowHighestTieredOffsetResponseV2.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​PruneBatchesBelowHighestTieredOffsetResponseV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​PruneBatchesBelowHighestTieredOffsetRequestV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​PurgeDeletedLogsResponseV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​PruneBatchesBelowHighestTieredOffsetResponseV2Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​PruneBatchesBelowHighestTieredOffsetResponseV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​PruneBatchesBelowHighestTieredOffsetRequestV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​ListOffsetsResponseV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​ListOffsetsRequestV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​InitDisklessLogResponseV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​InitDisklessLogRequestV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​InitDisklessLogProducerStateV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​FindBatchesResponseV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​FindBatchesRequestV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​EnforceRetentionResponseV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​EnforceRetentionRequestV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​DeleteRecordsResponseV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​DeleteRecordsRequestV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​CommitBatchResponseV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​CommitBatchRequestV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​BatchMetadataV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​BatchInfoV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​AdvanceCrossTierLogStartResponseV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​paths/​AdvanceCrossTierLogStartRequestV1Path.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​ListOffsetsResponseV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​ListOffsetsRequestV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​InitDisklessLogResponseV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​InitDisklessLogRequestV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​InitDisklessLogProducerStateV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​FindBatchesResponseV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​FindBatchesRequestV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​EnforceRetentionResponseV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​EnforceRetentionRequestV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​DeleteRecordsResponseV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​DeleteRecordsRequestV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​CommitBatchResponseV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​CommitBatchRequestV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​BatchMetadataV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​BatchInfoV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​AdvanceCrossTierLogStartResponseV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​udt/​AdvanceCrossTierLogStartRequestV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​PurgeDeletedLogsV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​PruneBatchesBelowHighestTieredOffsetV2Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​PruneBatchesBelowHighestTieredOffsetV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​ProducerStateRecord.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​LogsRecord.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​ListOffsetsV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​InitDisklessLogV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​FindBatchesV2Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​FindBatchesV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​FilesRecord.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​EnforceRetentionV2Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​EnforceRetentionV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​DeleteRecordsV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​CommitFileV2Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​CommitFileV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​BatchesRecord.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​records/​AdvanceCrossTierLogStartV1Record.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​PurgeDeletedLogsV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​PruneBatchesBelowHighestTieredOffsetV2.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​PruneBatchesBelowHighestTieredOffsetV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​ProducerState.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​Logs.java Updates schema annotations to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​ListOffsetsV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​InitDisklessLogV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​FindBatchesV2.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​FindBatchesV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​Files.java Updates schema annotations to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​EnforceRetentionV2.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​EnforceRetentionV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​DeleteRecordsV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​CommitFileV2.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​CommitFileV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​Batches.java Updates schema annotations to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​tables/​AdvanceCrossTierLogStartV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​Tables.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​routines/​MarkFileToDeleteV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​routines/​FlushCommitRunV2.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​routines/​DeleteTopicV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​routines/​DeleteFilesV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​routines/​DeleteBatchV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​routines/​BatchTimestamp.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​Routines.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​Keys.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​Indexes.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​PruneBatchesBelowHighestTieredOffsetErrorV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​ListOffsetsResponseErrorV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​InitDisklessLogErrorV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​FindBatchesResponseErrorV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​FileStateT.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​FileReasonT.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​EnforceRetentionResponseErrorV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​DeleteRecordsResponseErrorV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​CommitBatchResponseErrorV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​enums/​AdvanceCrossTierLogStartResponseErrorV1.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​Domains.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​jooq/​org/​jooq/​generated/​DefaultSchema.java Updates schema annotation to 33.
storage/​inkless/​src/​main/​java/​io/​aiven/​inkless/​control_plane/​InMemoryControlPlane.java Floors the first cross-tier offset in memory.
core/​src/​main/​scala/​kafka/​server/​ReplicaManager.scala Comment only: explains below-start delete behavior.

Review effort: Balanced

@giuseppelillo
Copy link
Copy Markdown
Contributor

// 0 is meaningful and MUST be reported: it is the cross-tier earliest of a freshly-tiered
// born-consolidated topic whose WAL prune frontier (log_start_offset) has since advanced above 0.
// The EARLIEST read path returns COALESCE(remote_log_start_offset, log_start_offset) (see V17), so
// if 0 were never written, EARLIEST would incorrectly report the pruned log_start_offset instead of
// the true earliest still readable from remote. Do NOT change this to `<= 0`.

This comment says a report of 0 must reach the control plane, because otherwise EARLIEST would show the pruned log_start_offset instead of the true remote earliest. Two things now make that reasoning out of date:

With V33, a first write of 0 while log_start_offset > 0 is stored as log_start_offset. That contradicts the comment as written, even though the reporter can't produce that write.

giuseppelillo
giuseppelillo previously approved these changes Dec 2, 2026
@giuseppelillo giuseppelillo 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.

Just a nit on a comment that is partially related to this PR, you could also address it in a follow up PR

@viktorsomogyi
Copy link
Copy Markdown
Contributor Author

Just a nit on a comment that is partially related to this PR, you could also address it in a follow up PR

I'd address it here because it's a small doc fix.

… 0 cross-tier log start [KC-879]

The comment in `CrossTierLogStartReporter.enqueue` said a report of `0`
must reach the control plane, or `EARLIEST` would show the pruned
`log_start_offset`. That reasoning no longer holds. The first prune sets
`remote_log_start_offset = log_start_offset`, and the control plane never
stores a first value below the log start.

Testing

`CrossTierLogStartReporterTest` passes and `make vale` reports no alerts.

Assisted-by: Claude Sonnet 5.5
@viktorsomogyi
viktorsomogyi merged commit 8455413 into main Dec 2, 2026
6 checks passed
@viktorsomogyi
viktorsomogyi deleted the svv/kc-879-delete-records-earliest-regress branch December 2, 2026 15:02
viktorsomogyi added a commit that referenced this pull request Dec 2, 2026
… V34 [KC-881]

Main took V33 for the cross-tier log start floor in #916, so this
branch's migration moves to V34. The functions don't overlap. The jOOQ
sources only bump their schema version.

The prune v2 deadlock test's Javadoc now describes what the test
guards instead of naming a release that never called prune v2.

Assisted-by: Claude Opus 5.5
gqmelo added a commit that referenced this pull request Dec 3, 2026
The `sync(compile)` commit of this round took the jOOQ sources that a
JDK 17 build regenerates. JDK 17 doesn't know the `this-escape` lint, so
those sources drop it from `@SuppressWarnings`. The `Verify JOOQ
classes` job regenerates them with JDK 25 and fails on the difference.

The sources now match the JDK 25 output again. The schema version bump
to 33 from #916 stays.

Assisted-by: Claude Opus 5.5
viktorsomogyi added a commit that referenced this pull request Dec 3, 2026
… V34 [KC-881]

Main took V33 for the cross-tier log start floor in #916, so this
branch's migration moves to V34. The functions don't overlap. The jOOQ
sources only bump their schema version.

The prune v2 deadlock test's Javadoc now describes what the test
guards instead of naming a release that never called prune v2.

Assisted-by: Claude Opus 5.5
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

0