Commit Graph

14378 Commits

Author SHA1 Message Date
Ken Huang 81447c7c95
KAFKA-18153 remove jenkins settings from settings.gradle (#18026)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-04 23:14:57 +08:00
Lianet Magrans f60382bf21
KAFKA-18127 Validate SubscriptionPattern used on v0 HB (#17989)
Reviewers: David Jacot <djacot@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-04 19:55:12 +08:00
Ken Huang 2ee7e4d22c
KAFKA-18152 add 0.11, 1.0, 1.1, and 2.0 streams dependencies to dockerfile (#18025)
Reviewers: Justine Olshan <jolshan@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-04 19:24:12 +08:00
Peter Lee b295318796
KAFKA-18145 Fix failed e2e ConnectDistributedTest.test_dynamic_logging (#18023)
The org.reflections is removed, so the initial logger of worker is only "root". However, the e2e needs a non-root logger to verify dynamic logger

We can add a logger to connect_log4j.properties to fix this e2e. For example:

log4j.logger.org.apache.kafka.clients.consumer.ConsumerConfig=ERROR
this can make admin/logger return two logger - org.apache.kafka.clients.consumer.ConsumerConfig and root

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-04 19:22:45 +08:00
PoAn Yang 8e6ea2c1d6
MINOR: fix unmatched tag in upgrade.html (#18032)
Signed-off-by: PoAn Yang <payang@apache.org>

Reviewers: Apoorv Mittal <amittal@confluent.io>, Josep Prat <josep.prat@aiven.io>
2024-12-04 11:18:47 +01:00
A. Sophie Blee-Goldman 31d97bc3c9
KAFKA-18026: KIP-1112, skip re-registering aggregate stores in StatefulProcessorNode (#18015)
Minor followup to #17929 based on this discussion

Also includes some very minor refactoring/renaming on the side. The only real change is in the KGroupedStreamImpl class

Reviewers: Guozhang Wang <guozhang.wang.us@gmail.com>
2024-12-03 22:18:55 -08:00
Peter Lee 095bd0a6d4
KAFKA-18101: Merge duplicate assertFutureThrows and assertFutureExceptionTypeEquals (#17991)
Reviewers: Ziming Deng<dengziming1993@gmail.com>,  Chia-Ping Tsai<chia7712@gmail.com>,  TaiJuWu<tjwu1217@gmail.com>.
2024-12-04 14:15:03 +08:00
Justine Olshan dbae448a05
KAFKA-18137: Unloading transaction state incorrectly removes loading partitions (#18011)
When there is a become follower transition on a transaction coordinator state partition, we intend to unload the state partition. However, we pass the new epoch to the method that does the unloading. In that method, we create a `TransactionPartitionAndLeaderEpoch` object comprising of the topic partition and the epoch that we use as a key to remove the partition from loading. However, we wouldn't ever expect to see this epoch in that map since we only load on the leader. See the code snippet: d00f0ecf1a/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala (L602)

We could have a partition load after the unloading occurs, and that partition will be stuck storing stale state on the broker until it restarts. While this may not immediately cause a correctness issue, we should try to properly clean up state.

Check that the epoch is less than the new epoch when removing the partition from loadingPartitions.

Added a test that failed before this change was made.

Reviewers: Artem Livshits <alivshits@confluent.io>, Jeff Kim <jeff.kim@confluent.io>
2024-12-03 14:51:07 -08:00
PoAn Yang fe88232b07
KAFKA-17750 Extend kafka-consumer-groups command line tool to support new consumer group (part 1) (#17958)
1) Bump validVersions of ConsumerGroupDescribeRequest.json and ConsumerGroupDescribeResponse.json to "0-1".

2) Add MemberType field to ConsumerGroupDescribeResponse.json. Default value is -1 (unknown). 0 is for classic member and 1 is for consumer member.

3) When ConsumerGroupMember#useClassicProtocol is true, return MemberType field as 0. Otherwise, return 1.

Reviewers: David Jacot <djacot@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-04 06:08:39 +08:00
Kuan-Po Tseng ac8b3dfbf0
KAFKA-18060 new coordinator does not handle TxnOffsetCommitRequest with empty member id when using CONSUMER group (#17914)
There are two issues in KAFKA-18060:

1) New coordinator can't handle the TxnOffsetCommitRequest with empty member id, and TxnOffsetCommitRequest v0-v2 do definitely has an empty member ID, causing ConsumerGroup#validateOffsetCommit to throw an UnknownMemberIdException. This prevents the old producer from calling sendOffsetsToTransaction. Note that TxnOffsetCommitRequest versions v0-v2 are included in KIP-896, so it seems the new coordinator should support that operations

2) The deprecated API Producer#sendOffsetsToTransaction does not use v0-v2 to send TxnOffsetCommitRequest with an empty member ID. Unfortunately, it has been released for a while. Therefore, the new coordinator needs to handle TxnOffsetCommitRequest with an empty member ID for all versions.

Taken from the two issues above, we need to handle empty member id in all API versions when new coordinator are dealing with TxnOffsetCommitRequest.

Reviewers: David Jacot <djacot@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-04 02:55:19 +08:00
Abhinav Dixit 180112a4a9
KAFKA-18084 Added write locks in SharePartition where locks were async calls were being made (#17957)
Reviewers: Andrew Schofield <aschofield@confluent.io>, poorv Mittal <apoorvmittal10@gmail.com>, Sushant Mahajan <sushant.mahajan88@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-04 01:46:29 +08:00
Peter Lee c76fb5cb9b
KAFKA-17893: Support record keys in the foreignKeyExtractor argument of KTable foreign join (#17756)
Currently, KTable foreign key joins only allow extracting the foreign key from the value of the source record. This forces users to duplicate data that might already exist in the key into the value when the foreign key needs to be derived from both the key and value. This leads to:

- Data duplication
- Additional storage overhead
- Potential data inconsistency if the duplicated data gets out of sync
- Less intuitive API when the foreign key is naturally derived from both key and value

This change allows user to extract the foreign key from the key and value of the source record.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2024-12-03 17:34:13 +01:00
Colin Patrick McCabe a8cdbaf4b3
KAFKA-18138: The controller must add all extant brokers to BrokerHeartbeatTracker when activating (#18009)
The controller must add all extant brokers to BrokerHeartbeatTracker when activating. Otherwise, we
could end up in a situation where a broker fails exactly as a controller failover occurs, and we
never fence it.

Also, fix a bug where the slf4j logger object in PeriodicTaskControlManager was initialized as
though it belonged to OffsetControlManager.

Reviewers: David Mao <dmao@confluent.io>, David Arthur <mumrah@gmail.com>
2024-12-03 10:33:52 -05:00
TengYao Chi ac08325bdd
KAFKA-18047: Add org.apache.kafka.automatic.config.providers to System Properties section (#17920)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-12-03 14:28:50 +01:00
David Jacot 275b995bf2
KAFKA-18095; Allow a member to join without subscription under new consumer protocol (#18003)
This patch relaxes requiring non-empty subscribed names and regex in the full heartbeat request. Without this, a consumer using client side regexes may not be able to join the group when the regex does not match any topics yet and this is inconsistent with the old protocol. Relaxing the subscribed regex is not strictly required but it seems better to keep it consistent.

Reviewers: Lianet Magrans <lmagrans@confluent.io>
2024-12-03 02:11:36 -08:00
A. Sophie Blee-Goldman 184b64fb41
KAFKA-18026: migrate KStream and KTable aggregates to use ProcesserSupplier#stores (#17929)
As part of KIP-1112, to maximize the utility of the new ProcessorWrapper, we need to migrate the DSL operators to the new method of attaching state stores by implementing ProcessorSupplier#stores, which makes these stores available for inspection by the user's wrapper.

This PR covers the aggregate operator for both KStream and KTable.


Reviewers: Guozhang Wang <guozhang.wang.us@gmail.com>, Rohan Desai <rohan@responsive.dev>
2024-12-03 02:09:43 -08:00
Manikumar Reddy f87c04854b
KAFKA-18013: Add integration test for duration based reset strategy in KafkaConsumer (#18008)
Add new test case to PlaintextConsumerFetchTest

Reviewers: Lianet Magrans <lmagrans@confluent.io>
2024-12-03 10:33:57 +05:30
Ken Huang ff44f5e0a5
KAFKA-17554 Flaky testFutureCompletionOutsidePoll in ConsumerNetworkClientTest (#17217)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-03 08:58:56 +08:00
Chia-Chuan Yu d00f0ecf1a
KAFKA-18124 Remove zk migration from `RaftManagerTest`, `BrokerLifecycleManagerTest`, `KafkaConfigTest`, and `ReplicaManagerTest` (#17990)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-03 03:27:12 +08:00
TengYao Chi 6fd951a9c0
KAFKA-17610 Drop alterConfigs (#18002)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-02 23:26:06 +08:00
Dejan Stojadinović f9215dae3b
KAFKA-12770 introduce `checkstyleVersion` gradle property (for overriding CheckStyle project-defined dependency version) (#10967)
Reviewers: Ken Huang <s7133700@gmail.com>, Luke Chen <showuon@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-02 21:14:30 +08:00
Kuan-Po Tseng b4258a0cb9
KAFKA-18070: Update kafka-metadata-quorum.sh output in docs to match KIP-853 (#17921)
Reviewers: Ziming Deng <dengziming1993@gmail.com>.
2024-12-02 19:58:00 +08:00
Kamal Chandraprakash 65fb274d29
KAFKA-17998: Fix the flaky OffloadAndTxnConsumeFromLeaderTest (#17959)
Reviewers: Satish Duggana <satishd@apache.org>
2024-12-02 16:59:16 +05:30
TengYao Chi c3d22180d4
KAFKA-18128 Fix failed test MetadataSchemaCheckerToolTest.testVerifyEvolutionGit in PR (#17996)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-02 16:19:18 +08:00
Yung 45c094ed23
KAFKA-18130 Remove kafka.utils.VersionInfo (#18001)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-02 15:36:53 +08:00
David Jacot 44cb90222c
MINOR: Refactor configs in GroupMetadataManager (#17982)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-02 02:26:28 +08:00
PoAn Yang 60ce83b2c6
KAFKA-18123 Fix flaky DynamicBrokerReconfigurationTest#testThreadPoolResize (#17986)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-01 20:58:02 +08:00
dengziming 615f1a0bf9
KAFKA-16181: Use incrementalAlterConfigs when updating broker configs by kafka-configs.sh (#15304)
This PR implement KIP-1011, kafka-configs.sh now uses incrementalAlterConfigs API to alter broker configurations instead of the deprecated alterConfigs API, and it will fall directly if the broker doesn't support incrementalAlterConfigs.

Reviewers: David Jacot <djacot@confluent.io>, OmniaGM <o.g.h.ibrahim@gmail.com>.
2024-12-01 18:32:02 +08:00
Chia-Chuan Yu 7ca02fd908
KAFKA-16617 Add KRaft info for the `advertised.listeners` doc description (#17552)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-30 03:12:31 +08:00
Manikumar Reddy ae3c5dec99
KAFKA-18013: Add support for duration based offset reset strategy to Kafka Consumer (#17972)
Update AutoOffsetResetStrategy.java to support duration based reset strategy
Update OffsetFetcher related classes and unit tests

Reviewers: Andrew Schofield <aschofield@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
2024-11-29 22:38:57 +05:30
Lianet Magrans 6237325fb1
KAFKA-15561 [5/N]: Integration tests for new subscribe API with Re2J pattern (#17964)
- integration tests for new subscribe api with RE2J pattern
- fix to ensure all topics are included in metadata requests when consumer is subscribed to RE2J pattern

Reviewers: David Jacot <djacot@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-30 01:02:39 +08:00
Ken Huang 9d23f89e05
KAFKA-17338 ConsumerConfig should prevent using partition assignors with CONSUMER group protocol (#16899)
Reviewers: Kirk True <ktrue@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>, Lianet Magrans <lmagrans@confluent.io>
2024-11-29 09:36:29 -05:00
Andrew Schofield e7bbcdb251
KAFKA-18090: Add ShareMemberDescription and Assignment (#17975)
Introduce ShareMemberDescription and ShareMemberAssignment as distinct classes for share groups. Although the correspondence with consumer groups is fairly close, the concepts are likely to diverge over time and separating these concepts now makes sense.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-29 10:20:01 +05:30
Colin Patrick McCabe b8c8e0c713
MINOR: Convert DynamicBrokerReconfigurationTest to KRaft (#17905)
Convert testUncleanLeaderElectionEnable and testMetricsReporterUpdate to KRaft.

Remove testAdvertisedListenerUpdate, testAddRemoveSslListener, testAddRemoveSaslListeners since we no longer support dynamically adding or removing network listeners when in KRaft mode.

Make TestUtils.ensureConsistentKRaftMetadata robust against brokers that don't have sharedServer.loader initialized yet (or have shut down).

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-28 11:59:38 -08:00
HYUNSANG HAN (한현상, Travis) 700bdd5fee
KAFKA-17997 Remove deprecated config log.message.timestamp.difference.max.ms (#17928)
Reviewers: Divij Vaidya <diviv@amazon.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-29 03:15:46 +08:00
PoAn Yang 1f3f03579c
KAFKA-17979 Change [pytest] to [tool:pytest] in setup.cfg file (#17740)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-29 02:26:58 +08:00
TaiJuWu e1ba01d214
KAFKA-18109 Fix failed SaslClientsWithInvalidCredentialsTest in tools module (#17971)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-28 10:59:21 +08:00
Almog Gavra 5243fb9a7d
KAFKA-18026: migrate KTableSource to use ProcesserSupplier#stores (#17903)
This PR is part of the implementation for KIP-1112 (KAFKA-18026). In order to have DSL operators be properly wrapped by the interface suggestion in 1112, we need to make sure they all use the ConnectedStoreProvider#stores method to connect stores instead of manually calling addStateStore.

This is a refactor only, there is no new behaviors.

Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2024-11-27 14:04:27 -08:00
TengYao Chi 8be99f44dc
KAFKA-18097 Upgrade readme to include min JDK changes (#17948)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-28 05:23:17 +08:00
Peter Lee b08b64c2d8
KAFKA-18098 add kraft support to testReplicaPlacementAllServers and testReplicaPlacementPartialServers (#17955)
Reviewers: Yung <yungyung7654321@gmail.com>, Colin P. McCabe <cmccabe@apache.org>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-28 05:21:47 +08:00
Bill Bejeck d334f60944
MINOR: KStreamRepartitionIntegrationTest bug (#17963)
The KStreamRepartitionIntegrationTest.shouldThrowAnExceptionWhenNumberOfPartitionsOfRepartitionOperationDoNotMatchSourceTopicWhenJoining test was taking two minutes due not reaching an expected condition. By updating to have the StreamsUncaughtExceptionHandler return a response of SHUTDOWN_CLIENT the expected ERROR state is now reached. The root cause was using the Thread.UncaughtExceptionHandler to handle the exception.

Without this fix, the test takes 2 minutes to run, and now it's 1 second.

Reviewers: Matthias Sax <mjsax@apache.org>
2024-11-27 16:08:05 -05:00
Colin Patrick McCabe cdf3aab661
MINOR: remove zk from several tests (#17949)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-28 04:52:04 +08:00
Chia-Chuan Yu c446e799be
KAFKA-17010 Remove `DescribeLogDirsResponse#LogDirInfo`, `DescribeLogDirsResponse#ReplicaInfo`, and `DescribeLogDirsResult#all` (#17953)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-28 04:42:34 +08:00
Lianet Magrans a39c984d21
KAFKA-15561 [4/N]: MockConsumer support for SubscriptionPattern (#17962)
Reviewers: David Jacot <djacot@confluent.io>
2024-11-27 14:33:28 -05:00
TaiJuWu 486f65e8c6
KAFKA-18100 `Using` block suppresses all errors (#17954)
https://github.com/apache/kafka/pull/15881 changed our tests to utilize `using` blocks. But these blocks don't throw any errors, so if there is a failed assertion within the block, the test will still pass. 

We should either check the failure using a corresponding `match` block with Success(_) and Failure(e), use `using.resource`, or use try/finally blocks to clean up resources.

See https://www.scala-lang.org/api/3.0.2/scala/util/Using$.html

Co-authored-by: frankvicky <kitingiao@gmail.com>

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-28 03:25:19 +08:00
David Jacot aae42ef656
KAFKA-17593; [9/N] Mark ConsumerGroupHeartbeat API v1 as stable (#17961)
Reviewers: Lianet Magrans <lmagrans@confluent.io>
2024-11-27 13:03:46 -05:00
Lianet Magrans 37b4d9b01d
KAFKA-15561 [3/N]: Client support for SubscriptionPattern in HB (#17951)
Reviewers: David Jacot <djacot@confluent.io>
2024-11-27 12:01:12 -05:00
Ken Huang c32a49549d
MINOR: Remove duplicate valid value in document (#17947)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-27 21:07:36 +08:00
Yung 434fe7c26e
KAFKA-18081 Remove isKRaftTest from the kraft-only tests (#17934)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-27 18:37:43 +08:00
PoAn Yang 3710add2a7
KAFKA-18012: Update the Scram configuration section for KRaft (#17844)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-11-27 11:37:24 +01:00