8000 chore(inkless): sync inkless-4.3 with upstream Apache Kafka 4.3.2 by gqmelo · Pull Request #859 · aiven/inkless · GitHub
[go: up one dir, main page]

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
fec5c19
KAFKA-20601: Allow static member rejoin when consumer group is full. …
chickenchickenlove Jun 23, 2026
39a6408
MINOR: Update 4.3 branch version to 4.3.2-SNAPSHOT
bbejeck Jun 23, 2026
e7070ec
KAFKA-20570: Catch RuntimeException in ConsumerProtocol deserializati…
dongnuo123 May 21, 2026
c7af7e5
KAFKA-20662: Throw `INCONSISTENT_GROUP_PROTOCOL` for malformed reques…
dongnuo123 Jun 23, 2026
51baa5b
KAFKA-20699: TopologyTestDriver.getStateStore must not reset the reco…
SouquieresAdam Jun 22, 2026
52f6eda
KAFKA-20732: seed highestOffsetInRemoteStorage before size-based remo…
horkyada Jul 1, 2026
3d770a0
KAFKA-20791: Bump log4j to 2.25.5 (#22794)
fvaleri Jul 9, 2026
1d2e1cb
KAFKA-20773: Bump jackson to 2.21.5 (#22793)
fvaleri Jul 9, 2026
0a0cee4
KAFKA-20746 NPE in MetadataCache#toCluster (#22801)
brandboat Jul 10, 2026
b27b48d
KAFKA-20805: Apply fix for refreshing task directory mtime on state m…
bbejeck Jul 16, 2026
022591e
KAFKA-20808: StreamThread dies with fatal InvalidStateStoreException …
mjsax Jul 17, 2026
e76dd92
KAFKA-20726; Don't reuse the BufferSupplier in kraft state machine (#…
tzy-0x7cf Jul 23, 2026
caf7eb3
KAFKA-20769: ListDeserializer can silently deserialize a corrupted en…
SEPURI-SAI-KRISHNA Jul 24, 2026
3870a7a
KAFKA-20827: don't re-create an already-owned task on assignment (#22…
alanlau28 Jul 24, 2026
c8a8091
KAFKA-20832: Fix cordon logic with user specified assignments (#22926)
mimaison Jul 27, 2026
e0c0dc0
KAFKA-20840: Bump jetty to 12.0.37 (#22956)
fvaleri Jul 27, 2026
f8b9175
KAFKA-20842 Bump lz4 to 1.11.1 (#22962)
fvaleri Jul 28, 2026
6ba0913
KAFKA-20253: Backport heartbeat CPU spin fixes (4.3) (#22964)
ChoMinGi Jul 30, 2026
4157122
KAFKA-20780: Fix to clear completed inflight poll on empty fetch resp…
lianetm Jul 28, 2026
87096d6
KAFKA-20782: Fix lost IQ metadata in "streams" protocol (#22778)
UladzislauBlok Aug 3, 2026
ef8e8bd
HOTFIX: add missing code changes are cherry-pick
Aug 3, 2026
96b735c
KAFKA-20885: Fix IQ metadata for source topics with fewer partitions …
mjsax Aug 4, 2026
54f5fe2
KAFKA-20893: Avoid reporting incorrect task-offsets to Kafka Streams …
mjsax Aug 5, 2026
eec55f5
KAFKA-20861: Kafka Streams should handle corrupted assignments pro-ac…
mjsax Aug 6, 2026
6b15c7e
KAFKA-14597: record-e2e-latency-max only considers consumption latenc…
alanlau28 Aug 10, 2026
7b9d847
KAFKA-20899: Fix "streams" StickyAssignor bug for standby tasks (#23096)
mjsax Aug 10, 2026
d712204
MINOR: improve "streams" default rebalance listener (#22991)
mjsax Aug 11, 2026
c4f3319
KAFKA-20711: Measure restore-remaining-records in offset slots (#22614)
nicktelford Aug 11, 2026
04fd223
KAFKA-20721: Removed timeout on task removal from state updater. (#23…
Nikita-Shupletsov Aug 12, 2026
33a9746
KAFKA-20877: Fix incorrect restore-rate and update-rate metrics (#23009)
mjsax Aug 12, 2026
ad893c8
MINOR: few code cleanups for KIP-1071 (#23080)
mjsax Aug 13, 2026
bbe7f0e
KAFKA-20870: Add test for the owned-task report for a single-role ass…
mjsax Aug 13, 2026
9a19890
KAFKA-20845: Don't flush empty batch when appending large records in …
squah-confluent Aug 20, 2026
e469c98
MINOR: improve ProcessorMetadata (#23156)
lucliu1108 Aug 20, 2026
9eaff7e
MINOR: improve ChangedDeserializer (#23157)
lucliu1108 Aug 20, 2026
e1a1ec8
MINOR: improve ProcessorRecordContext (#23158)
lucliu1108 Aug 20, 2026
5484148
MINOR: improve CombinedKeySchema (#23159)
lucliu1108 Aug 20, 2026
5630701
MINOR: improve punctuation schedule computation (#23219)
mjsax Aug 20, 2026
65e5b2b
MINOR: Fix fetch snapshot RPC topic partition check (#23185) (#23216)
kevin-wu24 Aug 21, 2026
2363788
MINOR: Refactor Connect validation endpoint logic (#23163)
mimaison Aug 19, 2026
cf1579d
MINOR: Refactor REST extension registration (#23150)
mimaison Aug 19, 2026
0941038
MINOR: update sandboxed-trivy-action version to latest approved versi…
OmniaGM Aug 21, 2026
7f228b7
MINOR: Cleanups in AlterConfigs (#23153)
mimaison Aug 24, 2026
f0a2be3
KAFKA-21004: Bump jackson to 2.21.6 (#23321)
harmadasg Sep 1, 2026
b0e3c97
MINOR: Additional cleanup in AlterConfigs (#23267)
omkreddy Sep 1, 2026
64b03b9
KAFKA-20916: Backport KAFKA-20354 to 4.3 (#23345)
Parkerhiphop Sep 3, 2026
3a669c7
KAFKA-20815: Remove unnecessary jline deps and bump to latest 3.x (#2…
m1a2st Sep 3, 2026
dbe0876
KAFKA-20936 Bump lz4-java to 1.11.2 (#23161)
mimaison Aug 14, 2026
c18b27f
KAFKA-20393: Fix stickyNode using stale IP when broker address change…
kwondh5217 Apr 9, 2026
a61e8a9
KAFKA-13499: Avoid restoring outdated records (#22115)
gabriellefu May 4, 2026
fb7279a
KAFKA-20875: Headers window store adapters must expose the retention …
alanlau28 Aug 11, 2026
b3add39
KAFKA-20876: Windowed restore optimisation gives up when `endOffset-1…
alanlau28 Aug 13, 2026
4bbc64b
KAFKA-20940: Windowed changelog restore optimization is skipped whene…
alanlau28 Aug 31, 2026
9c58c42
KAFKA-20533: Correcting error response for topic deletion during shar…
apoorvmittal10 Apr 28, 2026
a7b99c4
KAFKA-20765: Fix OffsetFetch stale-epoch retry spinning in dedup loop…
aliehsaeedii Aug 6, 2026
27305a9
KAFKA-20979: Ensure indexes resize are fsynced when shutting down (#2…
mimaison Aug 28, 2026
91de2a3
KAFKA-20449: Downgrade "not updating high watermark" log from WARN to…
tkornai Apr 14, 2026
53a7e98
KAFKA-1983 Remove redundant offset commits from EndToEndLatency (#23402)
AshenScribe Sep 8, 2026
a3fb671
KAFKA-20785: Return PRODUCER_FENCED when EndTxn commit races with coo…
suzhiking Aug 31, 2026
d32cdea
KAFKA-20312: Handle null leader during OffsetFetcher regroup safely (…
nileshkumar3 Apr 27, 2026
5e62180
KAFKA-20874: Close SslFactory in JaasOptionsUtils.createSSLSocketFact…
fvaleri Aug 6, 2026
b13a9b8
MINOR: Bump docker plugin actions to follow approved versions (#23425)
OmniaGM Sep 10, 2026
d4f5d1a
KAFKA-20187: AsyncKafkaConsumer does not clear endOffsetRequested fla…
m1a2st Sep 10, 2026
68504ea
KAFKA-20450 Allowlist based SafeObjectInputStream (#22056)
subbudvk Apr 28, 2026
dadd994
KAFKA-20700: Resolve symlinks in AllowedPaths before validation (#22631)
nileshkumar3 Jun 24, 2026
a4ed2d5
KAFKA-20442: Update consumer group assignment epoch when last member …
dajac Apr 15, 2026
c808f02
KAFKA-20442: Update share group assignment epoch when last member lea…
dajac Apr 15, 2026
5301e40
KAFKA-20442: Update streams group assignment epoch when last member l…
dajac Apr 15, 2026
f28a0ee
KAFKA-20434: Consumer group does not recompute assignment when static…
dajac Apr 13, 2026
a39f307
Revert "KAFKA-1983 Remove redundant offset commits from EndToEndLaten…
m1a2st Sep 11, 2026
4850d4a
KAFKA-20977: Fix RemoteCopyLagSegments off-by-one on single-record se…
imavishek Aug 28, 2026
4c2e5ae
MINOR: Align consumer assignor loading with share and streams (#22929)
mjsax Jul 28, 2026
188144f
KAFKA-20555: Use jakarta.annotation.Priority in JaasBasicAuthFilter (…
mimaison May 7, 2026
7cef352
Revert "MINOR: Align consumer assignor loading with share and streams…
m1a2st Sep 12, 2026
d504b90
Bound decompressed record size (#23448)
omkreddy Sep 13, 2026
b46933f
KAFKA-20464: Fix topology corruption when ConnectedStoreProviders sha…
ChoMinGi Sep 14, 2026
ce10cc6
MINOR: Add KAFKA-20464 upgrade guide note for 4.3 (#23459)
ChoMinGi Sep 14, 2026
886fb20
KAFKA-20979: Fix another gap in index metadata sync logic (#23316)
mimaison Sep 15, 2026
138d7b7
KAFKA-21096: Deregister SharePartition metrics on teardown to fix lea…
apoorvmittal10 Sep 15, 2026
39929f0
MINOR: Backport 4.3.1 upgrade guide to AK doc (#23467)
lucliu1108 Sep 15, 2026
40077b6
Bound array and tagged-field allocation in generated message readers
omkreddy Sep 16, 2026
68f650c
MINOR: Moving to atomic update of share sessions on initial epoch (#2…
apoorvmittal10 Sep 18, 2026
7f96224
MINOR: Fix share group failing tests (#23540)
apoorvmittal10 Sep 21, 2026
56e78f5
KAFKA-20416: Clear consumed offsets on task close (#23570)
bbejeck Sep 24, 2026
d6b866b
MINOR: Apply MessageUtil array limits in ArrayOf and CompactArrayOf
omkreddy Sep 25, 2026
2bff1f5
KAFKA-20873: Fix deadlock between removeStreamThread and addStreamThr…
frankvicky Sep 11, 2026
b338df9
MINOR: Add 4.3.2 to upgrade.md (#23479)
m1a2st Sep 28, 2026
a219569
Bump version to 4.3.2
m1a2st Sep 28, 2026
bc6c0af
Bump version to 4.3.2
m1a2st Sep 28, 2026
79d70b7
Merge tag '4.3.2-rc0' into 4.3
m1a2st Sep 28, 2026
938ed5d
MINOR: fix doc for CVE-2026-41115 (#22447)
showuon Jun 2, 2026
4faded5
MINOR: Validate client quota values and cap throttle time to int rang…
trnguyencflt Sep 30, 2026
a66c765
MINOR: Add policy validation to CreatePartitions (#23669)
ahuang98 Oct 2, 2026
4c43ced
KAFKA-21196: Release memory held by cancelled CoordinatorExecutorImpl…
dajac Oct 6, 2026
4a13ea0
Revert "Bump version to 4.3.2"
m1a2st Oct 7, 2026
30e0c71
Bump version to 4.3.2
m1a2st Oct 7, 2026
51e979b
MINOR: Bump snappy-java to 1.1.10.11
trnguyencflt Oct 7, 2026
fa713a9
KAFKA-21157 Bump Jackson version to 2.22.3 (#23748)
m1a2st Oct 9, 2026
f47ff5f
MINOR: Use Jackson 2.21.7 instead of 2.22.3 on 4.3 (#23758)
Russole Oct 9, 2026
967a334
Revert "Bump version to 4.3.2"
m1a2st Oct 9, 2026
5404e50
KAFKA-21174: Update lz4 to 1.11.4 (#23767)
m1a2st Oct 11, 2026
0a6c96d
Bump version to 4.3.2
m1a2st Oct 11, 2026
8cf07c4
Merge upstream 4.3.2 into inkless-4.3-sync-4.3.2
gqmelo Nov 6, 2026
eb14aed
docs(inkless:sync): add the release sync session for 4.3.2
gqmelo Nov 6, 2026
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/docker_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: |
python docker_build_test.py kafka/test -tag=test -type=$IMAGE_TYPE -u=$KAFKA_URL
- name: Run CVE scan
uses: lhotari/sandboxed-trivy-action@555963036b2012b44c1071508a236e569db28ebb # v1.0.1
uses: lhotari/sandboxed-trivy-action@f01374b6cc3bf7264ab238293e94f6db7ada6dd0 # v1.0.2
with:
scan-type: 'image'
scan-ref: 'kafka/test:test'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_official_image_build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: |
python docker_official_image_build_test.py kafka/test -tag=test -type=$IMAGE_TYPE -v=$KAFKA_VERSION
- name: Run CVE scan
uses: lhotari/sandboxed-trivy-action@555963036b2012b44c1071508a236e569db28ebb # v1.0.1
uses: lhotari/sandboxed-trivy-action@f01374b6cc3bf7264ab238293e94f6db7ada6dd0 # v1.0.2
with:
scan-type: 'image'
scan-ref: 'kafka/test:test'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker_promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- name: Login to Docker Hub
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker_rc_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ jobs:
python -m pip install --upgrade pip
pip install -r docker/requirements.txt
- name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- name: Login to Docker Hub
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
supported_image_tag: ['latest', '3.9.2', '4.0.1', '4.1.2', '4.2.0']
steps:
- name: Run CVE scan
uses: lhotari/sandboxed-trivy-action@555963036b2012b44c1071508a236e569db28ebb # v1.0.1
uses: lhotari/sandboxed-trivy-action@f01374b6cc3bf7264ab238293e94f6db7ada6dd0 # v1.0.2
if: always()
with:
scan-type: 'image'
Expand Down
64 changes: 30 additions & 34 deletions LICENSE-binary
Original file line number Diff line number Diff line change
Expand Up @@ -213,35 +213,35 @@ License Version 2.0:
- commons-validator-1.10.1
- hash4j-0.22.0
- jackson-annotations-2.21
- jackson-core-2.21.2
- jackson-databind-2.21.2
- jackson-dataformat-csv-2.21.2
- jackson-dataformat-yaml-2.21.2
- jackson-datatype-jdk8-2.21.2
- jackson-jakarta-rs-base-2.21.2
- jackson-jakarta-rs-json-provider-2.21.2
- jackson-module-blackbird-2.21.2
- jackson-module-jakarta-xmlbind-annotations-2.21.2
- jackson-core-2.21.7
- jackson-databind-2.21.7
- jackson-dataformat-csv-2.21.7
- jackson-dataformat-yaml-2.21.7
- jackson-datatype-jdk8-2.21.7
- jackson-jakarta-rs-base-2.21.7
- jackson-jakarta-rs-json-provider-2.21.7
- jackson-module-blackbird-2.21.7
- jackson-module-jakarta-xmlbind-annotations-2.21.7
- jakarta.inject-api-2.0.1
- jakarta.validation-api-3.0.2
- javassist-3.30.2-GA
- jetty-alpn-client-12.0.34
- jetty-client-12.0.34
- jetty-ee10-servlet-12.0.34
- jetty-ee10-servlets-12.0.34
- jetty-http-12.0.34
- jetty-io-12.0.34
- jetty-security-12.0.34
- jetty-server-12.0.34
- jetty-session-12.0.34
- jetty-util-12.0.34
- jetty-alpn-client-12.0.37
- jetty-client-12.0.37
- jetty-ee10-servlet-12.0.37
- jetty-ee10-servlets-12.0.37
- jetty-http-12.0.37
- jetty-io-12.0.37
- jetty-security-12.0.37
- jetty-server-12.0.37
- jetty-session-12.0.37
- jetty-util-12.0.37
- jose4j-0.9.6
- jspecify-1.0.0
- log4j-api-2.25.4
- log4j-core-2.25.4
- log4j-slf4j-impl-2.25.4
- log4j-1.2-api-2.25.4
- lz4-java-1.10.2
- log4j-api-2.25.5
- log4j-core-2.25.5
- log4j-slf4j-impl-2.25.5
- log4j-1.2-api-2.25.5
- lz4-java-1.11.4
- maven-artifact-3.9.15
- metrics-core-2.2.0
- opentelemetry-proto-1.3.2-alpha
Expand All @@ -250,7 +250,7 @@ License Version 2.0:
- scala-library-2.13.18
- scala-logging_2.13-3.9.6
- scala-reflect-2.13.18
- snappy-java-1.1.10.7
- snappy-java-1.1.10.11
- snakeyaml-2.5
- swagger-annotations-2.2.39

Expand All @@ -259,13 +259,6 @@ This product bundles various third-party components under other open source
licenses. This section summarizes those components and their licenses.
See licenses/ for text of these licenses.

---------------------------------------
Eclipse Distribution License - v 1.0
see: licenses/eclipse-distribution-license-1.0

- jakarta.activation-api-2.1.0
- jakarta.xml.bind-api-3.0.1

---------------------------------------
Eclipse Public License - v 2.0
see: licenses/eclipse-public-license-2.0
Expand All @@ -288,9 +281,10 @@ see: licenses/eclipse-public-license-2.0
CDDL 1.1 + GPLv2 with classpath exception
see: licenses/CDDL+GPL-1.1

- jakarta.activation-api-2.1.0
- jakarta.servlet-api-6.0.0
- jakarta.xml.bind-api-3.0.1
- javax.activation-api-1.2.0
- javax.annotation-api-1.3.2
- jaxb-api-2.3.1
- activation-1.1.1

Expand All @@ -312,7 +306,9 @@ BSD 2-Clause
---------------------------------------
BSD 3-Clause

- jline-3.30.4, see: licenses/jline-BSD-3-clause
- jline-native-3.30.15, see: licenses/jline-BSD-3-clause
- jline-reader-3.30.15, see: licenses/jline-BSD-3-clause
- jline-terminal-3.30.15, see: licenses/jline-BSD-3-clause
- protobuf-java-3.25.5, see: licenses/protobuf-java-BSD-3-clause
- jakarta.activation-2.0.1, see: licenses/jakarta-BSD-3-clause

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4252,7 +4252,7 @@ project(':connect:basic-auth-extension') {

implementation libs.slf4jApi
implementation libs.jakartaRsApi
implementation libs.jaxAnnotationApi
implementation libs.jakartaAnnotationApi

testImplementation libs.bcpkix
testImplementation libs.mockitoCore
Expand Down
2 changes: 1 addition & 1 deletion checkstyle/import-control.xml
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
<allow pkg= "javax.security.auth"/>
<subpackage name="basic">
<allow pkg="org.apache.kafka.connect.rest"/>
<allow pkg="javax.annotation"/>
<allow pkg="jakarta.annotation"/>
</subpackage>
</subpackage>

Expand Down
10 changes: 6 additions & 4 deletions checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
files="LoggingResource.java" />

<suppress checks="ClassDataAbstractionCoupling"
files="(RestServer|AbstractHerder|DistributedHerder|Worker(Test)?).java"/>
files="(RestServer|AbstractHerder(Test)?|DistributedHerder|Worker(Test)?).java"/>

<suppress checks="BooleanExpressionComplexity"
files="JsonConverter.java"/>
Expand Down Expand Up @@ -204,7 +204,7 @@

<!-- Streams tests -->
<suppress checks="ClassFanOutComplexity"
files="(RecordCollectorTest|StreamsPartitionAssignorTest|StreamThreadTest|StreamTaskTest|TaskManagerTest|TopologyTestDriverTest|KafkaStreamsTest|EosIntegrationTest|RestoreIntegrationTest).java"/>
files="(RecordCollectorTest|StreamsPartitionAssignorTest|StreamThreadTest|StreamTaskTest|TaskManagerTest|TopologyTestDriverTest|KafkaStreamsTest|EosIntegrationTest|RestoreIntegrationTest|StreamsGroupHeartbeatRequestManagerTest).java"/>

<suppress checks="MethodLength"
files="(EosIntegrationTest|KStreamKStreamJoinTest|KStreamKStreamLeftJoinTest|KStreamKStreamOuterJoinTest|KStreamSlidingWindowAggregateTest|KTableKTableForeignKeyJoinIntegrationTest|RocksDBWindowStoreTest|TopologyTestDriverTest).java"/>
Expand All @@ -219,7 +219,7 @@
files="(KStreamKStreamJoinTest|KTableKTableForeignKeyJoinIntegrationTest|RocksDBGenericOptionsToDbOptionsColumnFamilyOptionsAdapterTest|RelationalSmokeTest|MockProcessorContextStateStoreTest|IQv2StoreIntegrationTest|StreamsConfigTest).java"/>

<suppress checks="JavaNCSS"
files="(KStreamKStreamJoinTest|StreamTaskTest|StreamThreadTest|TaskManagerTest|TopologyTestDriverTest).java"/>
files="(KStreamKStreamJoinTest|StoreChangelogReaderTest|StreamTaskTest|StreamThreadTest|TaskManagerTest|TopologyTestDriverTest).java"/>

<suppress checks="NPathComplexity"
files="(KStreamKStreamJoinTest|KTableKTableForeignKeyJoinIntegrationTest|RelationalSmokeTest|MockProcessorContextStateStoreTest|TopologyTestDriverTest|IQv2StoreIntegrationTest).java"/>
Expand Down Expand Up @@ -317,9 +317,11 @@
files="(LocalLog|LogLoader|LogValidator|RemoteLogManager|RemoteIndexCache|UnifiedLog).java"/>
<suppress checks="ParameterNumber"
files="(LogLoader|UnifiedLog).java"/>
<suppress checks="ParameterNumber"
files="[/\\]Cleaner\.java"/>
<suppress checks="(ClassDataAbstractionCoupling|ClassFanOutComplexity)"
files="(UnifiedLog|RemoteLogManager|RemoteLogManagerTest|UnifiedLogTest).java"/>
<suppress checks="MethodLength" files="RemoteLogManagerConfig.java"/>
<suppress checks="MethodLength" files="(RemoteLogManagerConfig|UnifiedLog).java"/>
<suppress checks="JavaNCSS" files="(RemoteLogManagerTest|UnifiedLogTest).java"/>

<!-- benchmarks -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kafka.clients.admin;

import org.apache.kafka.clients.CommonClientConfigs;
import org.apache.kafka.common.config.AbstractConfig;
import org.apache.kafka.common.config.ConfigResource;
import org.apache.kafka.common.config.SaslConfigs;
import org.apache.kafka.common.config.provider.FileConfigProvider;
import org.apache.kafka.common.errors.ClusterAuthorizationException;
import org.apache.kafka.common.errors.InvalidRequestException;
import org.apache.kafka.common.security.auth.SecurityProtocol;
import org.apache.kafka.common.security.plain.PlainLoginModule;
import org.apache.kafka.common.test.ClusterInstance;
import org.apache.kafka.common.test.JaasUtils;
import org.apache.kafka.common.test.api.ClusterTest;
import org.apache.kafka.server.config.ServerConfigs;

import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

import static org.apache.kafka.common.config.AbstractConfig.CONFIG_PROVIDERS_CONFIG;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class AlterConfigsIntegrationTest {

private final ClusterInstance clusterInstance;
private Path file;

AlterConfigsIntegrationTest(ClusterInstance clusterInstance) {
this.clusterInstance = clusterInstance;
}

@BeforeEach
public void setup() throws IOException {
file = Files.createTempFile("provider", ".properties");
Files.writeString(file, "key=token");
}

@AfterEach
public void teardown() throws IOException {
Files.deleteIfExists(file);
}

@ClusterTest
public void testAlterConfigsWithConfigProviders() {
checkAlterConfigs(Map.of(), InvalidRequestException.class, "token", true);
}

@ClusterTest
public void testAlterConfigsWithConfigProvidersAndValidatorRejection() throws IOException {
Files.writeString(file, "key=" + Long.MAX_VALUE);
checkAlterConfigs(Map.of(), InvalidRequestException.class, String.valueOf(Long.MAX_VALUE), true);
}

@ClusterTest
public void testAlterConfigsRespectsConfigProviderAllowlist() {
String previous = System.getProperty(AbstractConfig.AUTOMATIC_CONFIG_PROVIDERS_PROPERTY);
try {
System.setProperty(AbstractConfig.AUTOMATIC_CONFIG_PROVIDERS_PROPERTY, "none");
checkAlterConfigs(Map.of(), InvalidRequestException.class, "token", false);
} finally {
if (previous == null) {
System.clearProperty(AbstractConfig.AUTOMATIC_CONFIG_PROVIDERS_PROPERTY);
} else {
System.setProperty(AbstractConfig.AUTOMATIC_CONFIG_PROVIDERS_PROPERTY, previous);
}
}
}

@ClusterTest(
brokerSecurityProtocol = SecurityProtocol.SASL_PLAINTEXT,
controllerSecurityProtocol = SecurityProtocol.SASL_PLAINTEXT)
public void testAlterConfigsWithConfigProvidersWithoutAcls() {
Map<String, Object> adminConfig = Map.of(
CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, SecurityProtocol.SASL_PLAINTEXT.name,
SaslConfigs.SASL_MECHANISM, "PLAIN",
SaslConfigs.SASL_JAAS_CONFIG,
PlainLoginModule.class.getName() + " required username=\"" + JaasUtils.KAFKA_PLAIN_USER1 +
"\" password=\"" + JaasUtils.KAFKA_PLAIN_USER1_PASSWORD + "\";");
checkAlterConfigs(adminConfig, ClusterAuthorizationException.class, "token", true);
}

private void checkAlterConfigs(Map<String, Object> adminConfig, Class<? extends Throwable> expectedCause, String value, boolean placeholder) {
try (Admin admin = clusterInstance.admin(adminConfig)) {
ConfigResource brokerResource = new ConfigResource(ConfigResource.Type.BROKER, "");
Map<ConfigResource, Collection<AlterConfigOp>> alterations = Map.of(brokerResource, configProviderOps());
ExecutionException ee = assertThrows(ExecutionException.class,
() -> admin.incrementalAlterConfigs(alterations).all().get());
assertInstanceOf(expectedCause, ee.getCause());
String message = ee.getCause().getMessage();
assertFalse(message.contains(value));
if (expectedCause == InvalidRequestException.class) {
if (placeholder) {
assertTrue(message.contains("${file:"));
} else {
assertTrue(message.contains(FileConfigProvider.class.getName() + " is not allowed"));
}
}
}
}

private Collection<AlterConfigOp> configProviderOps() {
return List.of(
new AlterConfigOp(new ConfigEntry(CONFIG_PROVIDERS_CONFIG, "file"),
AlterConfigOp.OpType.SET),
new AlterConfigOp(new ConfigEntry(
CONFIG_PROVIDERS_CONFIG + ".file.class", FileConfigProvider.class.getName()),
AlterConfigOp.OpType.SET),
new AlterConfigOp(new ConfigEntry(ServerConfigs.NUM_IO_THREADS_CONFIG, "${file:" + file.toAbsolutePath() + ":key}"),
AlterConfigOp.OpType.SET)
);
}
}
14 changes: 14 additions & 0 deletions clients/src/main/java/org/apache/kafka/clients/NetworkClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,13 @@ public long maybeUpdate(long now) {
if (timeToNextUpdate > 0)
return timeToNextUpdate;

// The node connection params can change while having the same node id hence check if the cached
// sticky node has not changed, if changed then reset the sticky node.
if (stickyNode != null && isNodeChanged(stickyNode)) {
log.debug("Telemetry stickyNode {} either is no longer in metadata or changed, clearing it.", stickyNode);
stickyNode = null;
}

// Per KIP-714, let's continue to re-use the same broker for as long as possible.
if (stickyNode == null) {
stickyNode = leastLoadedNode(now).node();
Expand Down Expand Up @@ -1442,6 +1449,13 @@ private long maybeUpdate(long now, Node node) {
return Long.MAX_VALUE;
}

private boolean isNodeChanged(Node node) {
Node newNode = metadataUpdater.fetchNodes().stream()
.filter(n -> n.id() == node.id())
.findFirst().orElse(null);
return newNode == null || !newNode.equals(node);
}

public void handleResponse(GetTelemetrySubscriptionsResponse response) {
clientTelemetrySender.handleResponse(response);
}
Expand Down
1 change: 1 addition & 0 deletions clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java < 9326 span data-view-component="true">
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,7 @@ public void onFailure(RuntimeException e) {
} catch (AuthenticationException e) {
log.error("An authentication error occurred in the heartbeat thread", e);
setFailureCause(e);
requestRejoin("authentication error in heartbeat thread");
} catch (GroupAuthorizationException e) {
log.error("A group authorization error occurred in the heartbeat thread", e);
setFailureCause(e);
Expand Down
Loading
Loading
0