8000 docs(inkless:release): add the 0.53 cherry-pick sessions and the 4.4 branch by gqmelo · Pull Request #939 · aiven/inkless · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/inkless/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ current Inkless version and add the tag to the published release. See

| Kafka version | Branch |
|---------------|---------------|
| 4.4 | `inkless-4.4` |
| 4.3 | `inkless-4.3` |
| 4.2 | `inkless-4.2` |
| 4.1 | `inkless-4.1` |
Expand Down
2 changes: 2 additions & 0 deletions inkless-sync/CHERRY-PICK-SESSION-TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

List commits in main branch order (oldest first). Exclude commits not applicable to the release branch (e.g., version bumps).

In the `Hash` column, record the hash of the commit on `main`, as `branch-consistency.sh --missing` prints it. Don't record the hash of the cherry-pick on the release branch: `git cherry-pick` creates a new hash, and a rebase of the release-prep branch changes it again.

| # | Hash | PR | Subject | Status |
|---|------|-----|---------|--------|
| 1 | | # | | Pending |
Expand Down
15 changes: 12 additions & 3 deletions inkless-sync/CHERRY-PICK-SYNC-GUIDE.md
8000
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ Run the consistency check to see which commits are missing:

This uses `--first-parent` on main to identify commits landed directly via PR (squash-merged), excluding upstream content brought in via merge commits. Commits are matched to the release branch by PR number (`(#NNN)` pattern).

The check misses Inkless fixes that reach `main` on a sync branch, inside an upstream sync merge. To find them, list the commits of each sync merge in the range that aren't in `apache/kafka`, and skip the `sync(...)` commits that adapt `main` to upstream. The 0.53 round found `ca375e2131` in the sync merge #897 this way:

```bash
git log --oneline --no-merges <merge>^1..<merge>^2 --not apache/trunk | grep -v ' sync('
```

To also see old commits that were intentionally skipped:

```bash
Expand Down Expand Up @@ -309,13 +315,16 @@ Fix compilation errors, then either amend the cherry-pick or create a separate `

### Known adaptations by branch

Main is at the Kafka 4.3 branch point. Each release branch differs from main in a few places that recur on every round. The full conflict history is in `inkless-sync/sessions/`.
Main is at the Kafka 4.4 branch point. Each release branch differs from main in a few places that recur on every round. The full conflict history is in `inkless-sync/sessions/`.

- **All branches**: build and test 4.1 with JDK 17. Gradle 8.14 does not run on Java 25. Do not commit the jOOQ sources that the 4.1 build rewrites.
- **4.3**: `QuorumController#createTopics` takes a `boolean forwarded` argument, and `MetadataDelta` has only `MetadataDelta.Builder`. Tests written on main use the old forms.
- **4.4**: the branch starts from main at the 4.4 branch point and adds the upstream 4.4.0 merge. Picks from main apply without adaptation.
- **4.3**: `kafka.server.ReplicaManager` is too big for SpotBugs, so `gradle/spotbugs-exclude.xml` excludes it as on 4.1.
- **4.2 and 4.1**: the reconfigurable broker config sets live in the Scala `DynamicBrokerConfig`. A change to the Java `DynamicBrokerConfig` on main needs a port. `BrokerReconfigurable#reconfigurableConfigs` returns a Scala `Set`.
- **4.2 and 4.1**: the metadata cache is the Scala `KRaftMetadataCache`. A change to the Java `KRaftMetadataCache` on main needs a port.
- **4.2 and 4.1**: `PartitionChangeBuilder` takes the ELR flag through `setEligibleLeaderReplicasEnabled`. `RecordBatch` is in `org.apache.kafka.common.record`.
- **4.2 and 4.1**: `QuorumController#createTopics` and the `ConfigurationControlManager` alter methods don't take a `boolean forwarded` argument. Controller tests written on main pass `forwarded`, so drop that argument when picking to 4.2 and 4.1.
- **4.2 and 4.1**: a reassignment completes only when every target replica is in the ISR, because KAFKA-19975 isn't on these branches. A controller test from main that completes a reassignment through the adding replicas alone needs all target replicas in the ISR.
- **4.1**: app-info metrics have no client-id tag. `OffsetSpec.earliestPendingUpload` does not exist. Controller tests use `LocalLogManagerTestEnv`. `RequestConvertToJson` uses the old `switch` style.
- **Test conflicts**: a conflict hunk in a large test file can pull in an unrelated main-only test. Keep only the tests the commit adds.

Expand Down Expand Up @@ -351,7 +360,7 @@ I need to cherry-pick inkless commits from main to a release branch.
## Steps

1. Run `./inkless-sync/branch-consistency.sh inkless-4.1 --missing` to find missing commits
2. Create session file from inkless-sync/CHERRY-PICK-SESSION-TEMPLATE.md
2. Create session file from inkless-sync/CHERRY-PICK-SESSION-TEMPLATE.md. In its commit table, record the hash of each commit on main, not the hash of its cherry-pick on the release branch
3. Present each commit for approval before cherry-picking
4. Resolve conflicts following inkless-sync/CHERRY-PICK-SYNC-GUIDE.md
5. Compile after each cherry-pick: `./gradlew :storage:inkless:compileJava :core:compileScala`
Expand Down
165 changes: 165 additions & 0 deletions inkless-sync/sessions/CHERRY-PICK-SESSION-inkless-4.1-2026-12-03.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Cherry-pick session: `inkless-4.1`

## Session info
- **Date**: 2026-12-03
- **Source**: origin/main (124717430b, #927)
- **Target**: inkless-4.1
- **Base**: inkless-4.1.2-0.52
- **Branch**: `inkless-4.1-0.53`
- **Status**: complete, for `inkless-release-0.53`

---

## Commits to cherry-pick

The range is `inkless-release-0.52..124717430b` on the first parent of `main`. #919 changes only `inkless-sync/main-sync.sh`. `branch-consistency.sh` excludes sync-tooling commits. This session skips #919.

| # | Hash | PR | Subject | Status |
|---|------|-----|---------|--------|
| 1 | 7f5b4b311f | #882 | `feat(inkless:switch): elect a chosen replica in phase 1 of the classic-to-diskless switch [KC-717]` | Applied (conflict) |
| 2 | 15c50d5304 | #889 | `docs(inkless:switch): document how to move local logs past the old seal after lower-seal [KC-837]` | Applied |
| 3 | 2929e6794c | #885 | `test(inkless:switch): hold each switch step before injecting faults [KC-838]` | Applied |
| 4 | b76e2f8459 | #895 | `test(inkless:control-plane): wait for topic metadata before describing it [KC-855]` | Applied |
| 5 | 37a24af147 | #894 | `fix(inkless:ci): skip push runs on release-prep branches` | Applied |
| 6 | 92381fb425 | #896 | `fix(inkless:switch): stamp the diskless leader epoch on consumer fetches of a switched partition [KC-852]` | Applied (conflict) |
| 7 | 241ca2b24b | #899 | `fix(inkless:controller): reject a topic type flag that isn't true or false` | Applied |
| 8 | 3e6930df46 | #901 | `fix(inkless:switch): don't answer a classic epoch from a log that ends below the seal [KC-866]` | Applied |
| 9 | 33baf7690a | #904 | `fix(inkless:switch): answer OffsetsForLeaderEpoch on in-sync followers while the switch is pending [KC-870]` | Applied |
| 10 | 72e42cd527 | #898 | `fix(inkless:metadata): prefer controller leader for managed replicas [KC-869]` | Applied |
| 11 | 55409b00a6 | #900 | `fix(inkless:switch): return a diskless leader epoch with a diskless offset in ListOffsets [KC-865]` | Applied (conflict) |
| 12 | b3a0562bea | #903 | `fix(inkless:switch): reject DeleteRecords while the switch is pending or in phase 1 [KC-867]` | Applied |
| 13 | 0ab94153e5 | #907 | `fix(inkless:consolidation): don't supplement an empty local read of a consolidating partition [KC-848]` | Applied (conflict) |
| 14 | f9fbc1c563 | #909 | `chore(ci): skip CI Complete and Pull Request Reviewed outside apache/kafka` | Applied |
| 15 | a37422bef6 | #887 | `fix(inkless:test): load inkless_produce_consume_test without the Antithesis SDK` | Applied |
| 16 | 3c784a528a | #905 | `fix(inkless:switch): rebuild a follower below the seal when the leader's local log starts past it [KC-872]` | Applied (conflict) |
| 17 | ac46047401 | #908 | `fix(inkless:switch): skip partitions in phase 1 in the consolidated log pruner [KC-878]` | Applied |
| 18 | c01b3f94d4 | #913 | `ci: add Dependabot for the inkless module dependencies` | Applied |
| 19 | 9a4923ffc6 | #906 | `fix(inkless:control-plane): guard against stale PostgreSQL standby reads [KC-859]` | Applied (conflict) |
| 20 | 149e3e1c7d | #915 | `fix(inkless:s3): switch default S3 retry mode to standard and record call-level timeouts [KC-874]` | Applied |
| 21 | 7616ca36ed | #918 | `chore(inkless:ci): add a single result job for branch rules` | Applied |
| 22 | c730503370 | #922 | `fix(inkless:test): test the inkless tag suffix without the baked version file` | Applied (conflict) |
| 23 | 3115387873 | #911 | `fix(inkless:consolidation): skip the diskless supplement when the local read ends mid-batch [KC-876]` | Applied |
| 24 | 80fcbadff9 | #921 | `fix(inkless:test): eliminate KRaft topic metadata propagation races in integration tests` | Applied |
| 25 | f9ebbbbd4e | #910 | `feat(inkless:control-plane): add standby circuit breaker with primary fallback [KC-858]` | Applied |
| 26 | f59eee6e1a | #923 | `ci(inkless): fix Gradle caching, add PR cancellation, and shard tests` | Applied (conflict) |
| 27 | c8ab585a31 | #924 | `test(inkless): speed up Postgres test setup and cluster test poll intervals` | Applied (conflict) |
| 28 | 8f7e180196 | #928 | `fix(inkless:docker): bump the tiered-storage plugin to 1.2.1 in images` | Applied |
| 29 | 84554137b1 | #916 | `fix(inkless:switch): keep DeleteRecords below the log start from regressing EARLIEST [KC-879]` | Applied |
| 30 | 1f3e0adca0 | #926 | `ci(inkless): tighten upstream CI triggers and build edge tarball once` | Applied |
| 31 | 5fe376a932 | #917 | `fix(inkless:test): query topic state from a controller host in switch tests` | Applied |
| 32 | 6969213574 | #933 | `fix(inkless:ci): limit main cache writers and run validate in parallel with tests` | Applied |
| 33 | 124717430b | #927 | `fix(inkless:switch): advance the leader's local log start past the seal on DeleteRecords [KC-880]` | Applied |

---

## Conflict resolution log

### #882 - elect a chosen replica in phase 1

**File**: `metadata/.../ReplicationControlManager.java`
- **Conflict**: the incoming side adds `electPhaseOneLeader` next to `logPartitionChangeInfo`, which 4.1 doesn't have.
- **Resolution**: added only `electPhaseOneLeader`. The `PartitionChangeBuilder` on 4.1 takes the ELR flag through `setEligibleLeaderReplicasEnabled`, not the constructor.

### #896 - diskless leader epoch on consumer fetches

**File**: `metadata/.../KRaftMetadataCache.java` (deleted on 4.1)
- **Conflict**: the Java metadata cache doesn't exist on 4.1.
- **Resolution**: dropped the Java file and added the `initialDisklessLeaderEpoch` tagged field to the Scala `kafka.server.metadata.KRaftMetadataCache`, next to `lastClassicLeaderEpoch`.

### #900 - diskless leader epoch in ListOffsets

**File**: `core/.../ReplicaManagerInklessTest.scala`
- **Conflict**: imports. 4.1 imports `org.apache.kafka.common.record._`, and main splits records into `record.internal`.
- **Resolution**: kept 4.1's record import and added `ApiKeys` to the protocol import.

### #905 - rebuild a follower below the seal

**File**: `core/.../InklessTopicTypeSwitcherClusterTest.java`
- **Conflict**: 4.1 sizes the follower pool with `REMOTE_LOG_MANAGER_THREAD_POOL_SIZE_PROP`.
- **Resolution**: added `LOG_CLEANUP_INTERVAL_MS_CONFIG` and kept 4.1's thread pool property.

### #906 - stale PostgreSQL standby reads

**Files**: `core/.../DynamicBrokerConfig.scala`, `core/.../ConsolidationFetcherThreadTest.scala`
- **Conflict**: a comment that names `DynamicBrokerConfig.AllDynamicConfigs` on 4.1, and test imports.
- **Resolution**: kept 4.1's name and took "four names" from the incoming side. Imported `TimestampAndOffset` from `org.apache.kafka.common.record.FileRecords`.

### #907 - empty local read of a consolidating partition

**Files**: `core/.../DelayedFetchTest.scala`, `core/.../ReplicaManagerInklessTest.scala`
- **Conflict**: imports and `LogReadResult` calls. 4.1 has `LogReadResult` in `org.apache.kafka.server`, and the constructor takes no `Errors` value.
- **Resolution**: took the incoming tests and dropped the `Errors.NONE` arguments. Kept 4.1's `LogReadResult` import.

### #922 - test the inkless tag suffix

**File**: `clients/.../utils/internals/AppInfoParserTest.java` (deleted on 4.1)
- **Conflict**: on 4.1 the test is `clients/.../utils/AppInfoParserTest.java`. The main class change applied to `utils/AppInfoParser.java` by rename detection.
- **Resolution**: applied the test hunk to the 4.1 path.

### #923 - Gradle caching and test shards

**File**: `.github/workflows/inkless.yml`
- **Conflict**: main moves the jOOQ check to its own job, and 4.1 runs JUnit on JDK 17 and 23.
- **Resolution**: took the incoming workflow but kept the `[ 17, 23 ]` matrix. The `jooq-check` job uses JDK 23, because Gradle 8.14 on 4.1 doesn't run on JDK 25.

### #924 - shorten the poll intervals of cluster tests

**Files**: `InklessConsolidatedDisklessReassignmentTest.java`, `InklessConsolidatedDisklessTopicsTest.java`, `InklessUntieredDisklessMigrationTest.java`
- **Conflict**: the follower thread pool property again.
- **Resolution**: set the task interval to 1000 ms and kept 4.1's thread pool lines.

---

## Compilation errors

All the errors are in tests. The fixes are in one sync(compile) commit.

| # | File | Error | Cherry-pick | Fix | Status |
|---|------|-------|-------------|-----|--------|
| 1 | `DelayedFetchTest.scala`, `ReplicaManagerInklessTest.scala` | `LogReadResult` takes no `Errors` | #907, #911 | `Optional.empty()` for the exception, or the 8-argument constructor | Fixed |
| 2 | `DelayedFetchTest.scala` | `DelayedFetch` takes a `Seq` of partition status | #907 | built the status as a `Seq` | Fixed |
| 3 | `DelayedFetchTest.scala`, `ReplicaManagerInklessTest.scala` | `RemoteStorageFetchInfo` takes a `TopicPartition` | #907 | `tp.topicPartition` | Fixed |
| 4 | `ReplicaManagerInklessTest.scala` | `makeLeader` and `makeFollower` have no `isNew` parameter | #896, #901, #903, #904 | `partitionState(...)` and no `isNew` | Fixed |
| 5 | `ReplicaManagerInklessTest.scala` | `HostedPartition.Online` takes no type parameter | #896 | `HostedPartition.Online` | Fixed |
| 6 | `InklessTopicTypeSwitcherClusterTest.java` | `org.apache.kafka.raft.KRaftConfigs` doesn't exist | #904 | `org.apache.kafka.server.config.KRaftConfigs` | Fixed |
| 7 | `ReplicaManagerInklessTest.scala` | `TierStateMachine.start` takes 3 arguments | #905 | `startTierStateMachine` with a stubbed `fetchEarliestLocalOffset` | Fixed |
| 8 | `ConsolidationFetcherThreadTest.scala` | the file doesn't import `LogConfig` | #927 | full name, as the rest of the file does | Fixed |

## Test adaptation

`ReplicationControlManagerInklessTest.testAlterDisklessSwitchRejectsAnElectionThatWouldCompleteAReassignment` (#882) fails on 4.1 because the election succeeds. On 4.1, `PartitionReassignmentReplicas` completes a reassignment only once every target replica is in the ISR, and main completes it once the adding replicas are in the ISR. With the adding replica as the only ISR member, the 4.1 builder elects the removing replica and keeps the reassignment staged, which is the safe outcome. A sync(test) commit puts all target replicas in the ISR. The test then exercises the rejection.

## Build notes

The 4.1 build rewrites the committed jOOQ sources. Restore `storage/inkless/src/main/jooq` after each build. #916 adds Flyway migration `V33` with its jOOQ sources. The restore keeps those sources.

---

## Verification

All builds and tests ran with JDK 17 at `ff2f6bffe1`.

- Compile: the main and test sources of `clients`, `metadata`, `storage:inkless`, `core`, and `tools`.
- Checks: `spotlessCheck`, checkstyle for `clients`, `metadata`, `storage:inkless`, `core`, and `tools`, and spotbugs for `core`, `metadata`, and `storage:inkless` pass.
- `:storage:inkless:test`: 1504 tests pass, including the Postgres and S3 integration tests.
- `metadata`: `ReplicationControlManagerInklessTest`, `ConfigurationControlManagerTest`, `TopicImageNodeTest`, and `PartitionRegistrationTest` pass.
- `core`: `ReplicaManagerInklessTest`, `DelayedFetchTest`, `DisklessFetchOffsetRouterTest`, `DynamicConfigChangeTest`, `InklessControlPlaneConnectionStringValidatorTest`, `ConsolidatedDisklessLogPrunerTest`, `ConsolidationFetcherThreadTest`, and `DisklessLeaderEndPointTest` pass.
- `core` cluster tests: `InklessTopicTypeSwitcherClusterTest`, `InklessConsolidatedDisklessTopicsTest`, `InklessConsolidatedDisklessReassignmentTest`, `InklessUntieredDisklessMigrationTest`, `InklessControlPlaneOutageClusterTest`, and `InklessControlPlaneMigrationLockClusterTest` pass.
- `TopicSwitchCommandTest` (`tools`) and `AppInfoParserTest` (`clients`) pass.

The full `make test` suite didn't run.

## Summary

| Result | Count |
|--------|-------|
| Cherry-picked cleanly | 24 |
| Cherry-picked with conflicts | 9 |
| Skipped (not applicable) | 1 (#919) |
| Failed | 0 |

---

## CI follow-up

- `ca375e2131` (`fix(inkless:build): skip jOOQ generation in make docs`) reached `main` inside the upstream sync merge #897, so `branch-consistency.sh` doesn't list it. Without it, the `make docs` step of `Compile and Check Java` regenerates the jOOQ sources under JDK 17. JDK 17 drops the `this-escape` suppression, and the job fails on the dirty tree. The commit applies cleanly after the 33 picks. With it, `make docs` under JDK 17 leaves the tree clean.
Loading
Loading
0