Commit Graph

14396 Commits

Author SHA1 Message Date
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
Joao Pedro Fonseca Dantas 3f834781a4
KAFKA-12844: clean up TaskId (#17904)
Rename topicGroupId as subtopology.

Reviewers: Matthias J. Sax <matthias@confluent.io>
2024-11-26 17:06:36 -08:00
Calvin Liu 2b2b3cd355
KAFKA-18062: use feature version to enable ELR (#17867)
Replace the ELR static config with feature version.

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2024-11-26 14:40:23 -08:00
Matthias J. Sax f5d712396b
MINOR: fix warnings in Kafka Streams state store tests (#17855)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-27 01:54:21 +08:00
PoAn Yang 98d47f47ef
KAFKA-18028 the effective kraft version of --no-initial-controllers should be 1 rather than 0 (#17836)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-27 01:45:11 +08:00
Ken Huang b42efc7dc2
KAFKA-18049: Upgrade the caffeine version to 3.1.1 (#17879)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-11-26 18:00:50 +01:00
David Jacot 24dd11d693
KAFKA-17593; [8/N] Resolve regular expressions (#17864)
This patch introduces the asynchronous resolution of regular expressions. Let me unpack a few details about the implementations:
1) I have decided to finally update all the regular expressions within a consumer group together. My assumption is that the number of regular expressions in a group will be generally small but the number of topics in a cluster is large. Hence grouping has two benefits. Firstly, it allows to go through the list of topics once for all the regular expressions. Secondly, it reduces the number of potential rebalances because all the regular expressions are updated at the same time.
2) An update is triggered when the group is subscribed to at least one regular expressions.
3) An update is triggered when there is no ongoing update.
4) An update is triggered only of the previous one is older than 10s.
5) An update is triggered when the group has unresolved regular expressions.
6) An update is triggered when the metadata image has new topics.

Reviewers: Jeff Kim <jeff.kim@confluent.io>
2024-11-26 08:56:25 -08:00
Andrew Schofield 11ce41fb1d
KAFKA-18092: Mark testBumpTransactionalEpochWithTV2Enabled as flaky (#17945)
Reviewers: Lianet Magrans <lmagrans@confluent.io>
2024-11-26 11:04:53 -05:00
TengYao Chi 0e4d8b3e86
KAFKA-17569 Rewrite TestLinearWriteSpeed by Java (#17736)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-26 23:43:01 +08:00
TengYao Chi 056a76e2b9
KAFKA-17811 Separate modules to use different JDKs (#17522)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-26 23:30:41 +08:00
ShivsundarR 866d66229d
KAFKA-18056: Fixed bug in handling commitAsync responses (#17909)
There was a bug in handling the ShareAcknowledgeResponse for commitAsync(). Currently after we receive a response, we send out a background event to the application thread to update the acknowledgement commit callbacks for EVERY TopicIdPartition.
The map that was sent was not cleared after sending the event. This meant we ended up sending responses for partitions that were already sent in the previous event. So there will be duplicate calls to the callback.

The PR fixes the bug and adds a unit test for the same.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-26 20:15:19 +05:30
Kuan-Po Tseng 55577e73b2
KAFKA-18083 ClusterInstance custom controllerListener not work (#17932)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-26 22:01:21 +08:00
Lianet Magrans 0b081fc310
KAFKA-15561 [2/N]: Background event and subscription state changes for RE2J pattern (#17918)
Reviewers: David Jacot <djacot@confluent.io>
2024-11-26 14:49:13 +01:00
PoAn Yang 58bf20d675
MINOR: add </script> back to security.html (#17944)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-26 21:44:56 +08:00
Yung cebec91470
KAFKA-18080 Replace DelayedItem by Long type (#17927)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-26 17:00:27 +08:00
Andrew Schofield 48d60efe98
KAFKA-17990: Deflake testShareAutoOffsetResetDefaultValue (#17916)
ShareConsumerTest.testShareAutoOffsetResetDefaultValue has been tightened up by making sure that records produced have been flushed before starting consumption. A possible but unlikely race condition seems the source of the flakiness and this should now be eliminated in the previous PR to this test case.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-26 10:18:29 +05:30
Andrew Schofield 5480d54d18
KAFKA-17544: Add log message for early access use of KafkaShareConsumer (#17940)
When a KafkaShareConsumer is constructed in AK 4.0, a log message is written warning about the early access nature of the feature.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-26 10:15:43 +05:30
Federico Valeri 918a67ece8
MINOR: Improve Docker examples readme (#17894)
This patch adds some clarity about the environment variables usage and limitations.
It also removes the invalid example and adds few style fixes.

Signed-off-by: Federico Valeri <fedevaleri@gmail.com>

Reviewers: Vedarth Sharma <vesharma@confluent.io>, Luke Chen <showuon@gmail.com>
2024-11-26 10:21:07 +08:00
Ritika Reddy 4fc9e442c3
KAFKA-17898: Refine Epoch Bumping Logic (#17849)
With KAFKA-14562, we implemented epoch bump on both the client and the server. Mentioned below are the different epoch bump scenarios we have on hand after enabled tv2

Non-Transactional Producers
• Epoch bumping is always allowed.
• Different code paths are used to handle epoch bumping.

Transactional Producers

No Epoch Bump Allowed
• coordinatorSupportsBumpingEpoch = false when initPIDVersion < 3 or initPIDVersion = null.

Client-Triggered Epoch Bump Allowed
• coordinatorSupportsBumpingEpoch = true when initPIDVersion >= 3.
• TransactionVersion2Enabled = false when endTxnVersion < 5.

Only Server-Triggered Epoch Bump Allowed
• TransactionVersion2Enabled = true and endTxnVersion >= 5.

We want to refine the code and make it more structured to correctly handle epoch bumping in the above mentioned cases.

The changes made in this patch are:

Rename epochBumpRequired to epochBumpTriggerRequired to symbolize a manual epoch bump request from the client
Modify canEpochBump method according to the above mentioned scenarios

Reviewers: Artem Livshits <alivshits@confluent.io>, Calvin Liu <caliu@confluent.io>, Justine Olshan <jolshan@confluent.io>
2024-11-25 14:29:15 -08:00
Bill Bejeck 7f8a592ad1
KAFKA-17869: Adding tests to ensure KIP-1076 doesn't interfere producer metrics[2/3] (#17783)
Adding producer tests to ensure the KIP-1076 methods don't interfere with existing metrics
Reviewers: Matthias Sax <mjsax@apache.org>
2024-11-25 16:24:16 -05:00
Matthias J. Sax 95947d2f58
KAFKA-17299: add unit tests for previous fix (#17919)
https://github.com/apache/kafka/pull/17899 fixed the issue, but did not
add any unit tests.

Reviewers: Bill Bejeck <bill@confluent.io>
2024-11-25 12:03:57 -08:00
Mickael Maison 13d9a199f2
KAFKA-18011 Remove ZooKeeper sections from the docs (#17813)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-26 01:58:48 +08:00
Rajini Sivaram 0f33b16fdf
KAFKA-18085: Abort inflight requests on existing connections while rebootstrapping (#17939)
When disconnecting channels before rebootstrapping due to the rebootstrap conditions introduced in KIP-1102, we should ensure that inflight requests are aborted similar to other disconnections like request timeout in clients. With the earlier rebootstrapping from KIP-899, we only rebootstrapped when there were no connections, so no disconnections are required.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-25 17:58:11 +00:00
Kaushik Raina 7908a4838b
Fix long running RangeQueryIntegrationTest. (#17933)
Noticed that RangeQueryIntegrationTest is taking ~approx 20 - 30min to run
Upon deep dive in logs, noticed that there were error for consumer rebalancing and test was stuck in loop
Seems like due to same application.id across tests, Kafka Streams application is failing to track its state correctly across rebalances.

Reviewers: Bill Bejeck <bbejeck@apache.org>
2024-11-25 11:42:02 -05:00
Andrew Schofield d17a149205
KAFKA-17956 Remove Admin.listShareGroups (#17912)
KIP-1043 introduced Admin.listGroups as the way to list all types of groups. As a result, Admin.listShareGroups has been removed. This PR is the final step of the removal.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-25 22:05:35 +08:00
ClarkChen 54843e6e1e
KAFKA-18077 Remove deprecated JmxReporter(String) (#17923)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-25 21:54:50 +08:00
Manikumar Reddy 3268435fd6
KAFKA-18013: Add AutoOffsetResetStrategy internal class (#17858)
- Deprecates OffsetResetStrategy enum
- Adds new internal class AutoOffsetResetStrategy
- Replaces all OffsetResetStrategy enum usages with AutoOffsetResetStrategy
- Deprecate old/Add new constructors to MockConsumer

 Reviewers: Andrew Schofield <aschofield@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2024-11-25 19:11:12 +05:30
Bruno Cadonna 619ef63f41
MINOR: Add 3.8.x and 3.9.x to Streams compatibility matrix (#17937)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-25 14:39:32 +01:00
PoAn Yang d1952e8542
KAFKA-18045 Add 0.11, 1.0, 1.1, and 2.0 back to streams_upgrade_test.py (#17876)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-25 21:34:36 +08:00
Lianet Magrans 654ebe10f4
KAFKA-18071: Avoid event to refresh regex if no pattern subscription (#17917)
Reviewers: David Jacot <djacot@confluent.io>, Andrew Schofield <aschofield@confluent.io>
2024-11-24 21:39:11 -05:00
PoAn Yang 70babd5716
KAFKA-18079 consumer-config does not work with console-share-consumer (#17925)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-24 20:13:14 +08:00
Kuan-Po Tseng ccbb73111c
KAFKA-18078 Fix failed MetricsTest.testJMXFilter (#17924)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-24 15:24:04 +08:00
Kuan-Po Tseng 5ad532f4ad
KAFKA-18075 Prevent ClusterInstance default producer and consumer initialization with empty configs (#17926)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-24 15:07:56 +08:00