Commit Graph

15043 Commits

Author SHA1 Message Date
Mickael Maison ece91e9247
KAFKA-14484: Move UnifiedLog static methods to storage (#18039)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-11 09:55:32 +01:00
TengYao Chi f5dd661cb5
KAFKA-18396: Migrate log4j1 configuration to log4j2 in KafkaDockerWrapper (#18394)
After log4j migration, we need to update the logging configuration in KafkaDockerWrapper from log4j1 to log4j2.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2025-02-11 13:25:23 +05:30
TaiJuWu 9fc7500684
KAFKA-18770 close the RM created by testDelayedShareFetchPurgatoryOperationExpiration (#18853)
it's crucial to utilize a try-finally block to ensure proper closure of the ReplicaManager. Failing to do so can result in an unreleased thread from the purgatory, potentially leading to errors in subsequent integration tests that incorporate thread leak detection.

Reviewers: poorv Mittal <apoorvmittal10@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-11 07:35:13 +08:00
Ken Huang 581e94840f
KAFKA-18366 Remove KafkaConfig.interBrokerProtocolVersion (#18820)
Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-11 06:18:02 +08:00
Xuan-Zhang Gong a6972db660
KAFKA-18658 add import control for examples module (#18812)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-11 06:07:40 +08:00
Ismael Juma da21b536c4
MINOR: Java version and TLS documentation improvements (#18822)
Most of the changes are obvious clean-ups/fixes. A couple of noteworthy items:

1. Support for non LTS versions is clarified (we were incorrectly stating full support
for Java 23).
2. TLS version negotiation details are clarified.

Reviewers: Matthias J. Sax <matthias@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-10 12:24:28 -08:00
Jhen-Yung Hsu 4e36368d08
KAFKA-18743 Remove leader.imbalance.per.broker.percentage as it is not supported by Kraft (#18821)
Remove `leader.imbalance.per.broker.percentage` from config.
Add `leader.imbalance.per.broker.percentage` to release note

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-11 04:01:57 +08:00
Ken Huang 70adf746c4
KAFKA-18225 ClientQuotaCallback#updateClusterMetadata is unsupported by kraft (#18196)
This commit ensures that the ClientQuotaCallback#updateClusterMetadata method is executed in KRaft mode. This method is triggered whenever a topic or cluster metadata change occurs. However, in KRaft mode, the current implementation of the updateClusterMetadata API is inefficient due to the requirement of creating a full Cluster object. To address this, a follow-up issue (KAFKA-18239) has been created to explore more efficient mechanisms for providing cluster information to the ClientQuotaCallback without incurring the overhead of a full Cluster object creation.

Reviewers: Mickael Maison <mickael.maison@gmail.com>, TaiJuWu <tjwu1217@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-11 01:03:02 +08:00
PoAn Yang d0f4c2f844
KAFKA-18441: Remove flaky tag on KafkaAdminClientTest#testAdminClientApisAuthenticationFailure (#18847)
Signed-off-by: PoAn Yang <payang@apache.org>
Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-02-10 16:36:27 +00:00
Kuan-Po Tseng e53af1a489
MINOR: fix KStream#to incorrect javadoc (#18838)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-10 22:10:36 +08:00
Chirag Wadhwa 7fef5b8646
KAFKA-18763: changed the assertion statement for acknowledgements to include only successful acks (#18846)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-02-10 11:36:26 +00:00
David Jacot be89ce5f61
MINOR: Accept specifying consumer group assignors by their short names (#18832)
At the moment, we require specifying builtin server side assignors by their full class name. This is not convenient and also exposed their full class name as part of our public API. This patch changes it to accept specifying builtin server side assignor by their short name (uniform or range) while continuing to accept full class name for customer assignors.

Reviewers: Jeff Kim <jeff.kim@confluent.io>
2025-02-10 02:58:44 -08:00
Matthias J. Sax 8b22f10083
MINOR: cleanup KStream JavaDocs (10/N) - stream-table-left-join (#18813)
Reviewers: Bill Bejeck <bill@confluent.io>
2025-02-07 17:58:16 -08:00
Matthias J. Sax 33bba9ef4a
MINOR: cleanup KStream JavaDocs (9/N) - flatMap[Values] (#18805)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2025-02-07 14:41:03 -08:00
Matthias J. Sax 326ee368ba
MINOR: cleanup KStream JavaDocs (5/N) - stream-globalTable-inner-join (#18747)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2025-02-07 13:44:50 -08:00
Lucas Brutschy 8d294cf709 MINOR: Fix streams smoke test flush records (#18830)
In the streams smoke test, flush records that are appended to the input topics, to advance the stream time so that all suppressed windows are flushed at the end of the test. The records are created with record time equal to current time + 2 days. caf0b67 changed the broker defaults so that records more than one hour in the future are rejected by the broker. This breaks the flush messages. By moving all record time stamps 2 days into the past, the existing logic should work correctly with the new default broker configuration.

A similar thing happens in the relational smoke test, where data is emitted 4 days into the future. To avoid running into retention / compaction, the window retention time is increased for both tests.

Reviewers: Bruno Cadonna <bruno@confluent.io>, Bill Bejeck <bill@confluent.io>
2025-02-07 13:21:55 -08:00
Gyeongwon, Do 557c17bfbc
MINOR: Refactor method name for consistency (#18779)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-02-07 20:07:34 +00:00
Sushant Mahajan 9e5503b04f
KAFKA-18745: Handle network related errors in persister. (#18824)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-02-07 15:59:06 +00:00
PoAn Yang b22c7d5b5c
KAFKA-17833: Convert DescribeAuthorizedOperationsTest to use KRaft (#18252)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2025-02-07 15:44:27 +01:00
Ismael Juma da166b9dc1
MINOR: Remove 'disable caching' workaround for Java 8 in connect (#18823)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Greg Harris <greg.harris@aiven.io>
2025-02-06 14:24:28 -08:00
Peter Lee 0621c0b4de
KAFKA-18275 Restarting broker in testing should use the same port (#18381)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-07 03:02:36 +08:00
Matthias J. Sax 780640f383
MINOR: cleanup KStream JavaDocs (8/N) - stream-stream-inner-join (#18761)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2025-02-06 10:58:29 -08:00
Matthias J. Sax bdab927a7d
MINOR: cleanup KStream JavaDocs (7/N) - repartition/to/toTable (#18760)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2025-02-06 10:57:54 -08:00
PoAn Yang c1a813b740
MINOR: add missing <li> to upgrade.html (#18817)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-07 00:11:07 +08:00
Nick Guo e2e302b7e6
KAFKA-18741 document the removal of `inter.broker.protocol.version` (#18818)
Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-07 00:07:31 +08:00
Piotr P. Karwasz 666571216b
KAFKA-18483 Disable `Log4jController` and `Loggers` if Log4j Core absent (#18496)
If Log4j Core is absent, most calls to Log4jController and Loggers will end up with a NoClassDefFoundError.

This changeset:

- Profits from the major version bump to rename k.util.Log4jController to LoggingController.
- Removes o.a.l.l.Level from the signature of public methods of o.a.k.connect.runtime.Loggers and replaces it with String.
- Provides an additional no-op implementation of k.util.LoggingController and o.a.k.connect.runtime.Loggers: if Log4j Core is not present on the runtime classpath the no-op implementation will be used.

Reviewers: Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-07 00:04:33 +08:00
Andrew Schofield aa8c57665f
KAFKA-18618: Improve leader change handling of acknowledgements [1/N] (#18672)
Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, ShivsundarR <shr@confluent.io>, Manikumar Reddy <manikumar.reddy@gmail.com>
2025-02-06 14:32:55 +00:00
Colin Patrick McCabe b2b2408692
KAFKA-18360 Remove zookeeper configurations (#18566)
Remove broker.id.generation.enable and reserved.broker.max.id, which are not used in KRaft mode.
Remove inter.broker.protocol.version, which is not used in KRaft mode.

Reviewers: PoAn Yang <payang@apache.org>, Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-06 22:22:11 +08:00
Ken Huang a3d9d881e1
KAFKA-18530 Remove ZooKeeperInternals (#18641)
Since zk has been removed in 4.0, config handlers no longer need to handle the "<default>" value. This PR streamlines the config update process by eliminating the unnecessary string checks for "<default>"

Reviewers: Christo Lolov <lolovc@amazon.com>, Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-06 17:48:17 +08:00
Ming-Yen Chung 34e7136b7a
MINOR: Fix wrong config property in KafkaConfigTest (#18815)
Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-06 17:09:52 +08:00
Shahbaz Aamir a565d8fdac
MINOR: removed unwanted line breaks (#18744)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-06 17:04:57 +08:00
Steven Schlansker 852f14065b
KAFKA-18689: Improve metric calculation to avoid NoSuchElementException (#18771)
Reviewers: Nick Telford <nick.telford@gmail.com>, Matthias J. Sax <matthias@confluent.io>
2025-02-05 21:39:30 -08:00
Matthias J. Sax 9774635bfd
MINOR: update Kafka Streams `Topology` JavaDocs (#18778)
Reviewers: Bill Bejeck <bill@confluent.io>
2025-02-05 20:24:14 -08:00
Joao Pedro Fonseca Dantas 8be2a8ed4e
MINOR: Add javadocs to AbstractMergedSortedCacheStoreIterator (#18772)
While reviewing PR #18287, I wrote some javadocs to help me understand the AbstractMergedSortedCacheStoreIterator. Maybe we could add them to help the next developers getting into it.

Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2025-02-05 17:20:53 -08:00
Apoorv Mittal 45c02d7fe3
MINOR: Removing share module from settings (#18806)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-06 02:04:30 +08:00
Kuan-Po Tseng b99be961b8
KAFKA-18206: EmbeddedKafkaCluster must set features (#18189)
related to KAFKA-18206, set features in EmbeddedKafkaCluster in both streams and connect module, note that this PR also fix potential transaction with empty records in sendPrivileged method as transaction version 2 doesn't allow this kind of scenario.

Reviewers: Justine Olshan <jolshan@confluent.io>
2025-02-05 09:14:36 -08:00
Lucas Brutschy 102de21355
KAFKA-17379: Fix inexpected state transition from ERROR to PENDING_SHUTDOWN (#18765)
The exception stack trace shown in the the ticket can happen when we are
concurrently closing the producer because of an error and doing a
regular close. This is not a bug in the test, but a real race condition
that can happen.

The sequence is this:

Thread1: Enter PENDING_ERROR
Thread2: Check if state is already ERROR
Thread1: Transition to ERROR
Thread2: Check if state is already PENDING_ERROR
Thread2: Transition to PENDING_SHUTDOWN

One idea to fix this would be to synchronize the sequence performed by
Thread1 using the state lock. However, this would require more changes,
since we cannot use the normal state transition method `setState` while
owning the lock, as it calls user-defined callbacks, which may create
deadlocks. Do avoid adding more synchronization, we can also fix it by
first attempting to transition to PENDING_SHUTDOWN, and _then_ checking
whether another thread is already attempting to shut down (states
PENDING_SHUTDOWN, PENDING_ERROR, ERROR, NOT_RUNNING). Since we never
transition from a shutdown state back to a non-shutdown state.

Reviewers: Matthias J. Sax <matthias@confluent.io>
2025-02-05 17:09:14 +01:00
Chirag Wadhwa 01587d09d8
KAFKA-18494-3: solution for the bug relating to gaps in the share partition cachedStates post initialization (#18696)
Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Abhinav Dixit <adixit@confluent.io>, Andrew Schofield <aschofield@confluent.io>
2025-02-05 15:16:25 +00:00
Sushant Mahajan 0bd1ff936f
KAFKA-18629: Add persister impl and tests for DeleteShareGroupState RPC. [2/N] (#18748)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-02-05 14:51:19 +00:00
Sanskar Jhajharia 7dbed2f6e8
[KAFKA-16720] AdminClient Support for ListShareGroupOffsets (2/2) (#18671)
Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Sushant Mahajan <smahajan@confluent.io>, Andrew Schofield <aschofield@confluent.io>
2025-02-05 14:38:09 +00:00
TengYao Chi 66363160c5
KAFKA-18645: New consumer should align close timeout handling with classic consumer (#18702)
Reviewers: Lianet Magrans <lmagrans@confluent.io>, Kirk True <ktrue@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-05 09:08:51 -05:00
Kamal Chandraprakash cb9c6718fa
KAFKA-18722: Remove the unreferenced methods in TBRLMM and ConsumerManager (#18791)
Reviewers: Luke Chen <showuon@gmail.com>, Christo Lolov <lolovc@amazon.com>
2025-02-05 13:13:24 +00:00
Nick Guo 22d4248fba
KAFKA-18694: Migrate suitable classes to records in coordinator-common module (#18782)
Reviewers: TengYao Chi <kitingiao@gmail.com>, Ken Huang <s7133700@gmail.com>, Christo Lolov <lolovc@amazon.com>
2025-02-05 10:50:55 +00:00
PoAn Yang 21645ebf0b
KAFKA-18705: Move ConfigRepository to metadata module (#18784)
Reviewers: TengYao Chi <kitingiao@gmail.com>, Christo Lolov <lolovc@amazon.com>
2025-02-05 10:13:36 +00:00
TengYao Chi aac62a32d9
KAFKA-18698: Migrate suitable classes to records in server and server-common modules (#18783)
Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, Christo Lolov <lolovc@amazon.com>
2025-02-05 10:00:11 +00:00
Ming-Yen Chung d830179375
KAFKA-18675 Add tests for valid and invalid broker addresses (#18781)
Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-02-05 17:01:51 +08:00
Matthias J. Sax a1d5dc0f9e HOTFIX: compilation error
Two merged PRs overlapped in a non-conflicting way, breaking compilation:
 - https://github.com/apache/kafka/pull/18722
 - https://github.com/apache/kafka/pull/18755
2025-02-04 20:32:52 -08:00
Matthias J. Sax 5988ee551e
MINOR: cleanup KStream JavaDocs (6/N) - map[Values] (#18755)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2025-02-04 19:57:59 -08:00
Justine Olshan 00dddee347
MINOR: Add missing test tag to UnifiedLogTest.scala (#18794)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-02-04 13:56:14 -08:00
Sean Quah 42e7cbb67e
KAFKA-18690: Keep leader metadata for RE2J-assigned partitions (#18777)
Reviewers: Lianet Magrans <lmagrans@confluent.io>
2025-02-04 13:22:28 -05:00