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
2 changes: 1 addition & 1 deletion .github/workflows/inkless-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# Prerequisites (must be done before triggering this workflow):
# - All target inkless commits are merged to main
# - Active release branches (inkless-4.1, inkless-4.2, ...) have been updated
# - Active release branches (inkless-4.1, inkless-4.2, inkless-4.3, ...) have been updated
# with those commits via the cherry-pick sync process
# - No pending cherry-picks on active branches (validated in step 2)
#
Expand Down
63 changes: 63 additions & 0 deletions docs/inkless/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,69 @@ Regenerate a draft with the `inkless-changelog` skill (or run it directly):

---

## 0.48 (Kafka 4.1.2, 4.2.1, 4.3.1)

> Upstream sync: main development base moved to Kafka 4.3.0-SNAPSHOT (from 4.2.0-SNAPSHOT), Scala 2.13.17 -> 2.13.18. `inkless-4.3` (Kafka 4.3.1) ships its first release with this increment.

### Features
- (inkless:storage) default S3 API call timeouts to 2s and 1s (#791)
- (inkless:consume) measure the fetch data phase and its queueing [KC-446] (#784)
- (inkless:storage) bound and shorten the GCS upload path (#783)
- (inkless:delete) soft-delete diskless topics and purge in the background [KC-349] (#782)
- (inkless:consume) default the lagging request-rate limit off, cap batches per partition (#769)
- (inkless:control-plane) enable batch coalescing by default (#766)

### Fixes
- (inkless:storage) count retried GCS error responses (#789)
- (inkless:ci) copy integrationTest JUnit XML into build/junit-xml (#793)
- (inkless:delete) do not sleep inside the topic purger tick [KC-349] (#792)
- (inkless:release) exclude sync-tooling commits from the branch-consistency gate (#794)
- (inkless:ci) update Inkless CI workflow and JUnit catalog parsing (#788)
- (inkless:gcs) narrow fetch length before opening the reader (#781)
- (inkless:storage) report an oversized fetch as a storage failure [KC-481] (#778)
- (inkless:consume) size fetch buffers to the payload [KC-481] (#772)
- (inkless:consume) serve consumer reads from a lagging AZ replica [KC-461] (#774)
- (inkless:gcs) count batch object deletions in metrics [KC-483] (#775)
- (inkless-sync) use trunk merge base for --before-version (#770)
- (inkless-sync) avoid arithmetic error in conflict count check (#768)
- (inkless:control_plane) make the diskless fetch budget fair across partitions [KC-407] (#750)
- (inkless:fetch) preserve legacy fetch request partition identity in response [KC-353] (#762)
- (inkless:metadata) accept pipe as a client.id AZ separator (#767)
- (inkless:build) stop reusing `inklessTag` as both the override key and the resolved value [KC-384] (#765)

### Refactors
- (inkless:consume) drop four never-recorded fetch metrics (#787)

### Tests
- (inkless:consolidation) tolerate re-delivery in the consume check (#785)

### Docs
- (inkless:sync) align sync guides with PEP 440 version-consistency fixes (#780)
- (inkless:consolidation) Diskless Consolidation documentation (#702)
- (inkless:sync) add sync PR merge steps to main-sync plan (#776)
- (inkless:release) add 0.47 changelog entry (#764)

### Chores
- (inkless:ci) drop nightly workflow, schedule system tests instead (#777)

### Other
- (ci) extend inkless system tests timeout to 3 hours (#773)

### Config & metric changes
- config added: `inkless.topic.purger.interval.ms`, default 60000 (1 minute); `inkless.topic.purger.max.batches.per.cycle`, default 20000 -- pace the background purge of soft-deleted diskless logs, per broker (#782)
- config added: `inkless.storage.gcs.connect.timeout`, default 2000; `inkless.storage.gcs.read.timeout`, default 1000 -- bound each GCS request attempt; previously only the google-cloud client defaults (20s/20s) applied (#783)
- config default changed: `inkless.storage.s3.api.call.timeout` null -> 2000; `inkless.storage.s3.api.call.attempt.timeout` null -> 1000 -- hung S3 calls fail fast instead of relying on the AWS SDK's unbounded defaults (#791)
- config default changed: `inkless.fetch.lagging.consumer.request.rate.limit` 200 -> 0 (off); `inkless.fetch.find.batches.max.per.partition` 0 -> 1024 -- the lagging consumer thread pool governs GET rate, and the consumer's `fetch.max.bytes` drives per-fetch fan-out (#769)
- config default changed: `inkless.control.plane.batch.coalescing.enabled` false -> true; the key now documents under the control-plane section of `configs.rst` (the duplicate `InklessConfig` define never fed behavior) (#766)
- metric mbean added: `io.aiven.inkless.delete:type=TopicPurger` with `TopicPurgerRate`, `TopicPurgerBatchesRate`, `TopicPurgerLogsRate`, `TopicPurgerFilesMarkedRate`, `TopicPurgerErrorRate`, `TopicPurgerCycleSaturatedRate`, `TopicPurgerTotalTime`, `TopicPurgerWorkRemain`, `LastSuccessfulTopicPurgeAgeMs`; `PostgresControlPlane :: PurgeDeletedLogsQueryRate`, `PurgeDeletedLogsQueryTime`, `PurgeDeletedLogsLastSuccessfulQueryAgeMs` (#782)
- metric attrs added: `InklessFetchMetrics :: FetchQueueTime`, `FetchDataTime`, `FetchLaggingObjectBytes`, `InFlightLaggingObjectBytes`, `InFlightLaggingObjectBytesMax` (#784)
- metric attrs added: `gcs-client-metrics :: object-upload-rate/total`, `server-errors-rate/total`, `throttling-errors-rate/total`, `other-errors-rate/total` (#783); retried error responses count toward the error attrs (#789)
- metric attrs removed: `InklessFetchMetrics :: CacheHitCount`, `CacheMissCount`, `CacheQueryTime`, `CacheStoreTime` -- nothing ever recorded them, so no live series disappears (#787)

### Postgres schema changes
- `V27__Find_batches_request_level_min_one_message.sql` -- `CREATE OR REPLACE FUNCTION find_batches_v2`, no table lock (#750).
- `V28__Soft_delete_logs.sql` -- `ALTER TABLE logs ADD COLUMN deleted_at` (nullable, no default: catalog-only) and `CREATE INDEX logs_by_deleted_at_idx` (partial, no `CONCURRENTLY`: Flyway runs each migration in a transaction). Both take `ACCESS EXCLUSIVE` on `logs`, which the produce commit path locks per row, so commits wait for the migration; `logs` holds one row per diskless partition, so the scan is short. Also deletes `producer_state` rows orphaned by the old `delete_topic_v1` (row locks only) and adds `purge_deleted_logs_v1`. The index cannot be pre-built because the column does not exist before the migration (#782).

## 0.47 (Kafka 4.1.2, 4.2.1)

### Features
Expand Down
11 changes: 3 additions & 8 deletions docs/inkless/RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,14 @@ gh release download inkless-release-0.33 --repo aiven/inkless --pattern "*.tgz"

### Active

These branches receive new Inkless releases. When a release is cut, both are updated
simultaneously with the same Inkless version number.
These branches receive new Inkless releases. When a release is cut, all of them are updated
with the same Inkless version number.

See [GitHub Releases](https://github.com/aiven/inkless/releases) for the latest version on each branch.

| Branch | Kafka version |
|---------------|---------------|
| `inkless-4.3` | 4.3.1 |
| `inkless-4.2` | 4.2.1 |
| `inkless-4.1` | 4.1.2 |

Expand All @@ -104,12 +105,6 @@ See [GitHub Releases](https://github.com/aiven/inkless/releases) for the latest
|---------------|---------------|----------------------|
| `inkless-4.0` | 4.0.2 | `inkless-4.0.2-0.37` |

### Planned

| Branch | Kafka version | Status |
|---------------|---------------|-----------------|
| `inkless-4.3` | 4.3.x | Not yet created |

If a commit cannot be cleanly backported across active branches, they may diverge by one
version increment (see [Versioning Strategy](VERSIONING-STRATEGY.md)).

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Cherry-pick Session: inkless-4.1

## Session Info
- **Date**: 2026-09-09
- **Source**: origin/main (72e432f6fb, #789)
- **Target**: inkless-4.1
- **Base**: 2ae259b970 (inkless-4.1.1-0.47)
- **Status**: Complete

---

## Commits to Cherry-pick

| # | Hash | PR | Subject | Status |
|---|------|-----|---------|--------|
| 1 | f2042aa116 | #764 | docs(inkless:release): add 0.47 changelog entry | Applied |
| 2 | d7ded0f603 | #765 | fix(inkless:build): stop reusing inklessTag as both the override key and the resolved value [KC-384] | Applied |
| 3 | 1c39908f9d | #767 | fix(inkless:metadata): accept pipe as a client.id AZ separator | Applied |
| 4 | 187e6213ff | #762 | fix(inkless:fetch): preserve legacy fetch request partition identity in response [KC-353] | Applied |
| 5 | f93145ff32 | #766 | feat(inkless:control-plane): enable batch coalescing by default | Applied |
| 6 | b1fcb5f6f7 | #750 | fix(inkless:control_plane): make the diskless fetch budget fair across partitions [KC-407] | Applied |
| 7 | 4925b82ccc | #769 | feat(inkless:consume): default the lagging request-rate limit off, cap batches per partition | Applied |
| 8 | d29cce09d1 | #777 | chore(inkless:ci): drop nightly workflow, schedule system tests instead | Applied |
| 9 | 17511cb7d8 | #775 | fix(inkless:gcs): count batch object deletions in metrics [KC-483] | Applied |
| 10 | fa2d0dd2b9 | #774 | fix(inkless:consume): serve consumer reads from a lagging AZ replica [KC-461] | Applied |
| 11 | 7eec2c8373 | #772 | fix(inkless:consume): size fetch buffers to the payload [KC-481] | Applied |
| 12 | 58aed69133 | #778 | fix(inkless:storage): report an oversized fetch as a storage failure [KC-481] | Applied |
| 13 | ea1dc9b0ed | #702 | docs(inkless:consolidation): Diskless Consolidation documentation | Applied |
| 14 | 3a00358ce4 | #781 | fix(inkless:gcs): narrow fetch length before opening the reader | Applied |
| 15 | a6716f7037 | #782 | feat(inkless:delete): soft-delete diskless topics and purge in the background [KC-349] | Applied |
| 16 | 6c57f5aadf | #785 | test(inkless:consolidation): tolerate re-delivery in the consume check | Applied |
| 17 | f7e7412d14 | #783 | feat(inkless:storage): bound and shorten the GCS upload path | Applied |
| 18 | 94fe3a0a02 | #788 | fix(inkless:ci): update Inkless CI workflow and JUnit catalog parsing | Applied |
| 19 | 5fa6669803 | #784 | feat(inkless:consume): measure the fetch data phase and its queueing [KC-446] | Applied |
| 20 | 470d46973e | #794 | fix(inkless:release): exclude sync-tooling commits from the branch-consistency gate | Applied |
| 21 | 095cf08133 | #787 | refactor(inkless:consume): drop four never-recorded fetch metrics | Applied |
| 22 | 5693b9d4a2 | #792 | fix(inkless:delete): do not sleep inside the topic purger tick [KC-349] | Applied |
| 23 | 8d97bb4235 | #793 | fix(inkless:ci): copy integrationTest JUnit XML into build/junit-xml | Applied |
| 24 | 62e4c51047 | #791 | feat(inkless:storage): default S3 API call timeouts to 2s and 1s | Applied |
| 25 | 72e432f6fb | #789 | fix(inkless:storage): count retried GCS error responses | Applied |

Excluded by the gate (sync tooling): #768, #770, #776, #780. #773 sync(ci) excluded by the existing rule.

---

## Conflict Resolution Log

### #750 - fix(inkless:control_plane): make the diskless fetch budget fair across partitions [KC-407]

**File**: `core/src/main/scala/kafka/server/DelayedFetch.scala` (2 hunks)
- **Conflict**: main's `tryCompleteDiskless` and `onComplete` iterate a `util.LinkedHashMap` via `.asScala` / `.asScala.iterator`; 4.1 holds `fetchPartitionStatus` and `disklessFetchPartitionStatus` as `Seq[(TopicIdPartition, FetchPartitionStatus)]`.
- **Resolution**: kept 4.1's `Seq` code in both hunks; carried over the "probe is unbudgeted" comment; dropped the LinkedHashMap-iterator comment.
- **Reason**: #750 requires request order to reach `ReplicaManager.fetchDisklessMessages`. `Seq.map` preserves order, so 4.1 already satisfies the invariant; the iterator rewrite exists only to avoid `Map.map` rebuilding a `HashMap`, which does not apply to a `Seq`.

### #777 - chore(inkless:ci): drop nightly workflow, schedule system tests instead

**Files**: `.github/workflows/inkless-nightly.yml` (deleted by pick, modified on 4.1), `.github/workflows/inkless-system-tests.yml`
- **Resolution**: `git rm` the nightly workflow; took the pick's `inkless-system-tests.yml`. Both now match origin/main.
- **Reason**: same as 4.2: 4.1 never received #773 (gate-excluded `sync(ci)` commit) that #777 builds on. No branch-specific content.

### #774 - fix(inkless:consume): serve consumer reads from a lagging AZ replica [KC-461]

**File**: `core/src/main/scala/kafka/server/DelayedFetch.scala`
- **Conflict**: `tryComplete` loop. main: `classicFetchPartitionStatus.forEach { (tp, fs) =>` over a Java map; 4.1: `foreach { case (tp, fs) =>` over a `Seq`, one indent level deeper.
- **Resolution**: kept 4.1's loop shape and inserted the two #774 edits at 4.1 indentation: `fetchOnlyFromLeader` via `replicaReadAllowed.getOrElseUpdate(... allowsOlderConsumerReplicaRead ...)`, and the `isBelowSealAndAheadOfLocalLog` guard ahead of case F. `private val replicaReadAllowed` auto-merged; `mutable` resolves through the existing `scala.collection._` import.

**File**: `core/src/main/scala/kafka/server/ReplicaManager.scala`
- **Conflict**: import block, same as 4.2. Took the pick's metric-name import; kept 4.1's `{InklessMetadataView, KRaftMetadataCache}`.

**File**: `core/src/test/scala/unit/kafka/server/ReplicaManagerInklessTest.scala`
- **Conflict**: `org.apache.kafka.storage.internals.log.{...}` import line. Union of both sides (main adds `LogReadInfo`, `LogReadResult`; 4.1 side had no extra symbols).

### #788 - fix(inkless:ci): update Inkless CI workflow and JUnit catalog parsing

**File**: `.github/workflows/inkless.yml`
- **Conflict**: JOOQ generation step: JDK 25 / `setup-java@v5` (main) vs JDK 23 / `setup-java@v4` (4.1).
- **Resolution**: kept 4.1's JDK 23 step. Auto-merged parts taken as-is (`checkout@v5`, `./.github/actions/setup-python` which exists on 4.1, junit catalog export step). Adjusted the two "only run on java N" comments to 23 to match 4.1's `[17, 23]` matrix.
- **Reason**: 4.1 CI runs Java 17/23; the JDK 25 move belongs to trunk.

---

## Compilation Errors

| # | File:Line | Error | Cherry-pick | Fix | Status |
|---|-----------|-------|-------------|-----|--------|
| 1 | core/src/test/java/kafka/server/PreKip392FetchClient.java:26 | package org.apache.kafka.common.record.internal does not exist (same as 4.2) | #774 | import org.apache.kafka.common.record.Record (separate sync(compile) commit) | Fixed |
| 3 | core/src/test/scala/integration/kafka/server/DelayedFetchTest.scala:312,322 | type LinkedHashMap is not a member of package util (DelayedFetch takes Seq on 4.1) | #750 | build disklessFetchPartitionStatus as Seq, classic as Seq.empty (sync(test) commit) | Fixed |
| 4 | core/src/test/scala/unit/kafka/server/ReplicaManagerInklessTest.scala:68 and 7 ctor sites | LogReadResult not in storage.internals.log; ctor last arg Errors not accepted | #774 | drop LogReadResult from storage import (already imported from org.apache.kafka.server); drop Errors.NONE; OFFSET_OUT_OF_RANGE -> Optional.of[Throwable](OffsetOutOfRangeException) (same sync(test) commit) | Fixed |
| 2 | core/src/main/scala/kafka/server/ReplicaManager.scala:3224 | multiple constructors for LogReadResult: last arg Errors not accepted | #774 | Optional.empty[Throwable]() in place of Errors.NONE (separate sync(compile) commit) | Fixed |

---

## Verification

- [x] make fmt: no changes
- [x] make build (BUILD SUCCESSFUL)
- [x] make test (all three gradle invocations BUILD SUCCESSFUL, no failed tests; the adapted #750 fetch-order test and the #774 ReplicaManagerInklessTest cases ran and passed)
- [x] branch-consistency.sh --check against the local head: 0 actionable missing, 2 old
- [x] #794, #787, #792, #793, #791, #789 applied clean after the first push; compile of storage:inkless and core main+test, then the tests these commits touch (TopicPurgerMockedTest, MetricCollectorTest, S3ClientBuilderTest, S3StorageConfigTest, GcsErrorHandlingTest, S3ErrorMetricsTest, InklessDisklessTopicDeleteTest): all passed.
Loading
Loading