Commit Graph

14200 Commits

Author SHA1 Message Date
David Arthur edab667a9a
MINOR Quarantine some flaky tests (#17779)
Reviewers: Colin Patrick McCabe <cmccabe@apache.org>
2024-11-12 19:34:44 -05:00
Sushant Mahajan adf4b6eb39
KAFKA-17991: Added timed calls for future.get in persister. (#17772)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Apoorv Mittal <apoorvmittal10@gmail.com>, David Arthur <mumrah@gmail.com>
2024-11-12 19:15:39 -05:00
Colin Patrick McCabe 54fda50ba5
MINOR: convert DescribeLogDirsRequestTest to KRaft (#17746)
Reviewers: David Arthur <mumrah@gmail.com>
2024-11-12 18:40:25 -05:00
Colin Patrick McCabe 1aa24475f1
MINOR: convert AddPartitionsToTxnRequestServerTest to KRaft (#17762)
Reviewers: David Arthur <mumrah@gmail.com>
2024-11-12 18:39:28 -05:00
Colin Patrick McCabe b888e73449
MINOR: convert ConsumerTopicCreationTest to KRaft (#17760)
Reviewers: David Arthur <mumrah@gmail.com>
2024-11-12 12:20:20 -08:00
Colin Patrick McCabe 8a5bfb274f
MINOR: Convert FetchRequestDownConversionConfigTest.scala to KRaft (#17759)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-11-12 10:05:16 -08:00
Kamal Chandraprakash 6dddabb359
KAFKA-16780: Document the new RemoteLogMetadataManager#nextSegmentWithTxnIndex API in upgrade notes. (#17735)
Reviewers: Divij Vaidya <diviv@amazon.com>
2024-11-12 23:15:12 +05:30
Kamal Chandraprakash 5914013219
KAFKA-17980: Introduce `isReady` API in RemoteLogMetadataManager (#17737)
- The isReady API in RemoteLogMetadataManager (RLMM) is used to denote whether the partition metadata is ready for remote storage operations. The plugin implementors can use this API to denote the partition status while bootstrapping the RLMM.
- Using this API, we are gracefully starting the remote log components. The segment copy, delete, and other operations that hits remote storage will be invoked once the metadata is ready for a given partition.
- See KIP-1105 (https://cwiki.apache.org/confluence/display/KAFKA/KIP-1105%3A+Make+remote+log+manager+thread-pool+configs+dynamic) for more details.

Reviewers: Federico Valeri <fvaleri@redhat.com>, Satish Duggana <satishd@apache.org>
2024-11-12 22:47:48 +05:30
ShivsundarR 6cf4081540
KAFKA-17985: Set share.auto.offset.reset to earliest in ShareRoundTripWorker (#17758)
After the share.auto.offset.reset dynamic config was added for share groups in this commit - 9db5ed0, we needed to update this config value to "earliest" in ShareRoundTripWorker when it creates the consumer.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-12 22:24:28 +05:30
Sebastien Viale c8f360c5f5
KAFKA-17744: Improve state updater logs when restorating state (#17714)
The logs for Kafka Streams local state restoration incorrectly refer to the StreamThread instead of the StateUpdater thread, which is responsible for decoupling the restoration process. The restore consumer also references StreamThread instead of StateUpdater. 

This commit corrects the log message for more clarity.

Reviewer: Bruno Cadonna <cadonna@apache.org>
2024-11-12 17:20:44 +01:00
Nick Telford a696b4d6f4
KAFKA-17978: Fix invalid topology on Task assignment (#17778)
When we introduced "startup tasks" in #16922, we initialized them with
no input partitions, because they aren't known until assignment.

However, when we update them during assignment, it's possible that we
update the topology with the incorrect source topics for some internal
topics, due to a difference in the way internal topics are handled for
StandbyTasks.

To resolve this, we now initialize startup tasks with the correct input
partitions, by calculating them from the Topology.

When we assign our startup tasks, we now conditionally update their
input partitions only if they've actually changed, just as we do for
regular StandbyTasks.

With this, the E2E tests now pass, as expected.

Reviewer: Bruno Cadonna <cadonna@apache.org>
2024-11-12 17:18:42 +01:00
Dániel Urbán 8563955e39
KAFKA-17632: Fix RoundRobinPartitioner for even partition counts (#17620)
RoundRobinPartitioner does not handle the fact that on new batch creation, the partition method is called twice.

Reviewers: Viktor Somogyi-Vass <viktorsomogyi@gmail.com>, Mickael Maison <mickael.maison@gmail.com>
2024-11-12 15:44:36 +01:00
David Jacot 5a5239770f
MINOR: Refactor GroupCoordinator's Assertions (#17755)
This patch cleans up the `Assertions` class in the `group-coordinator` module.

Reviewers: Lianet Magrans <lmagrans@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-12 05:30:58 -08:00
Colin Patrick McCabe 939831fdab
MINOR: Convert AlterReplicaLogDirsRequestTest to KRaft (#17764)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-11-12 12:38:52 +01:00
Ken Huang 207b35901c
KAFKA-17314 Fix the typo: `maxlifeTimeMs` (#17749)
Reviewers: TengYao Chi <kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-12 16:26:29 +08:00
Kuan-Po Tseng a951b73fa5
KAFKA-17975 Remove ControllerQuorumVotersFutureManager (#17754)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-12 15:14:25 +08:00
David Jacot 8be958d661
MINOR: Cleanup GroupMetadataManagerTest (#17751)
This patch does a few cleanups in GroupMetadataManagerTest:
* Uses `Map.of` where possible.
* Uses `List.of` instead of `Arrays.asList`.
* Fix inconsistent indentation in a few places.

Reviewers: Lianet Magrans <lmagrans@confluent.io>
2024-11-11 22:53:07 -08:00
Colin Patrick McCabe 668299ebcb
MINOR: remove AlterUserScramCredentialsRequestTest.testAlterNotController (#17757)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-12 11:50:49 +08:00
TapDang 9e01a92155
KAFKA-15722: Add KRaft support in RackAwareAutoTopicCreationTest
Reviewers: Colin P. McCabe <cmccabe@apache.org>
2024-11-11 19:18:12 -08:00
Chengyan c92f16a727
KAFKA-17787: Removed --zookeeper option and logic from ConfigCommand (#17507)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
Co-authored-by: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-11 18:50:49 +01:00
Chirag Wadhwa 9db5ed00a8
KAFKA-16726: Added share.auto.offset.reset dynamic config for share groups (#17573)
This PR adds another dynamic config share.auto.offset.reset fir share groups.


Reviewers:  Andrew Schofield <aschofield@confluent.io>, Apoorv Mittal <apoorvmittal10@gmail.com>,  Abhinav Dixit <adixit@confluent.io>, Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-11 14:36:11 +05:30
Linsiyuan9 7e5ffd3403
KAFKA-17583 Improve the ConfigCommand documentation to show how to set `key=[val1,val2]` (#17243)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-11 12:06:32 +08:00
Ken Huang 0a81dd54ee
MINOR: fix KafkaRaftManager typo (#17738)
Reviewers: TengYao Chi <kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-11 11:54:58 +08:00
Colin Patrick McCabe beb790e256
MINOR: Convert kafka.api.MetricsTest to KRaft (#17744)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-11 11:54:26 +08:00
Colin Patrick McCabe a57b7d8279
MINOR: Remove some obsolete JUnit tests (#17745)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-11 09:18:57 +08:00
Chia-Chuan Yu 4319bfa7b8
KAFKA-17974 Upgrade gradle from 8.10 to 8.10.2 (#17734)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-11 09:14:04 +08:00
PoAn Yang 440e0b8801
KAFKA-17923 Remove old kafka version from e2e (#17673)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-11 06:22:06 +08:00
wperlichek 9c0fe85605
KAFKA-17779: Fix flaky RemoteLogManager test (#17724)
Reviewers: Kamal Chandraprakash <kamal.chandraprakash@gmail.com>
2024-11-10 11:50:24 +05:30
Kirk True 42ea29c421
KAFKA-17925 Convert Kafka Client integration tests to use KRaft (#17670)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-10 10:38:01 +08:00
Matthias J. Sax 0bc91be145
KAFKA-17872: Update consumed offsets on records with invalid timestamp (#17710)
TimestampExtractor allows to drop records by returning a timestamp of -1. For this case, we still need to update consumed offsets to allows us to commit progress.

Reviewers: Bill Bejeck <bill@confluent.io>
2024-11-09 17:21:16 -08:00
Yung 4b80591df2
KAFKA-15549 Bump swagger dependency version from 2.2.8 to 2.2.25 (#17730)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-10 04:04:02 +08:00
Mickael Maison 5d2074e8f2
MINOR: Move StopPartition to server-common (#17704)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-10 03:13:12 +08:00
TengYao Chi 393455eb1a
KAFKA-17837 Rewrite DeleteTopicTest (#17579)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-10 03:06:52 +08:00
Apoorv Mittal 4966aed40d
KAFKA-17970 Moving some share purgatory classes from core to share module (#17722)
As part of PR: https://github.com/apache/kafka/pull/17636 where purgatory has been moved from core to server-common hence move some existing classes used in Share Fetch to Share module.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-10 01:04:17 +08:00
TengYao Chi 81019b6e9f
MINOR: Delete unused member from KafkaAdminClient (#17729)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-09 23:39:55 +08:00
TengYao Chi 4e3a3d398d
KAFKA-17570 Rewrite StressTestLog by Java (#17249)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-09 14:24:32 +08:00
Jeff Kim 65ae070e12
MINOR: log fix in SnapshottableCoordinator (#17726)
Reviewers: donaldzhu-cc, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-09 14:00:41 +08:00
Kamal Chandraprakash 324a74d4fd
KAFKA-17801: RemoteLogManager may compute inaccurate upperBoundOffset for aborted txns (#17676)
Reviewers: Jun Rao <junrao@gmail.com>
2024-11-09 08:52:17 +05:30
A. Sophie Blee-Goldman 32d9dec9e1
rebase to fix merge conflict (#17702)
Fixes an issue with the TTD in the specific case where users don't specify an initial time for the driver and also don't specify a start timestamp for the TestInputTopic, then pipe input records without timestamps. This combination results in a slight mismatch in the expected timestamps for the piped records, which can be noticeable when writing tests with very small time deltas.

The problem is that, while both the TTD and the TestInputTopic will be initialized to the "current time" when not otherwise specified, it's possible for some milliseconds to have passed between the creation of the TTD and the creation of the TestInputTopic. This can result in a TestInputTopic getting a start timestamp that's several ms larger than the driver's time, and ultimately causing the piped input records to have timestamps slightly in the future relative to the driver.

In practice even those who hit this issue might not notice it if they aren't manipulating time in their tests, or are advancing time by enough to negate the several-milliseconds of difference. However we noticed a test fail due to this because we were testing a ttl-based processor and had advanced the driver time by only 1 millisecond past the ttl. The piped record should have been expired, but because it's timestamp was a few milliseconds longer than the driver's start time, this test ended up failing.

Reviewers: Matthias Sax <mjsax@apache.org>, Bruno Cadonna <cadonna@apache.org>, Lucas Brutschy < lbrutschy@confluent.io>
2024-11-08 19:04:07 -08:00
David Jacot f7d2a8cd52
MINOR: Cleanup GroupCoordinatorRecordHelpers (#17718)
Reviewers: Jeff Kim <jeff.kim@confluent.io>, Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-09 00:00:03 +08:00
PoAn Yang 02b2fa0e3c
KAFKA-17926 Improve the documentation explaining why max.in.flight.requests.per.connection should not exceed 5 (#17719)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-08 23:42:52 +08:00
Sushant Mahajan 2e2b0a58ed
KAFKA-17914: Update string ref with SharePartitionKey. (#17660)
Currently, we are using the String repr of the shareCoordinator/sharePartition key (groupId:topicId:parition) as defined in kip-932 in a few methods like ShareCoordinator.partitionFor and ShareCoordinatorMetadataCacheHelper.getShareCoordinator.
This has the potential to introduce subtle bugs when incorrect strings are used to invoke these methods. What is perturbing is that the failures might be intermittent.
This PR aims to remedy the situation by changing the type to the concrete SharePartitionKey. This way callers need not be worried about a specific encoding or format of the coordinator key as long as the SharePartitionKey has the correct fields set.
There is one issue - the FIND_COORDINATOR RPC does require the coordinator key to be set as a String in the request body. We can't get around this and have to set the value as String. However, on the KafkaApis handler side we parse this key into a SharePartitionKey again and gain compile time safety. One downside is that we need to split and format the incoming coordinator key in the request but that can be encapsulated at a single location in SharePartitionKey.
Added tests for partitionFor.

Reviewers: Andrew Schofield <aschofield@confluent.io>,  Apoorv Mittal <apoorvmittal10@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-08 15:05:39 +05:30
Kamal Chandraprakash b9976437e1
KAFKA-16780: Txn consumer exerts pressure on remote storage when collecting aborted txns (#17659)
- KIP-1058 (https://cwiki.apache.org/confluence/display/KAFKA/KIP-1058:+Txn+consumer+exerts+pressure+on+remote+storage+when+collecting+aborted+transactions)
- Unit and Integration tests added.

Reviewers: Divij Vaidya <diviv@amazon.com>
2024-11-08 14:49:09 +05:30
Mickael Maison 0049b967e5
KAFKA-17890: Move DelayedOperationPurgatory to server-common (#17636)
Reviewers: Jun Rao <jun@confluent.io>, Apoorv Mittal <amittal@confluent.io>
2024-11-08 09:55:09 +01:00
David Jacot 1792b19a05
KAFKA-17593; [4/N] Introduce ConsumerGroupRegularExpression record & related bookkeeping in ConsumerGroup (#17694)
This patch introduces the ConsumerGroupRegularExpression record (key + value) and updates the `GroupMatadataManager` and the `ConsumerGroup` to bookkeep it appropriately. Note that with this change, regular expressions are counted as subscribers in the `subscribedTopicNames` data structure. This is important because the topic metadata of the group is computed based on it.

Reviewers: Jeff Kim <jeff.kim@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
2024-11-07 23:16:51 -08:00
Joao Pedro Fonseca Dantas 95650431df
KAFKA-16339: [2/4 KStream#flatTransform] Remove Deprecated "transformer" methods and classes (#17245)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2024-11-07 17:35:17 -08:00
xijiu 7413a5a9e4
KAFKA-17913 Fix KRaft controller count recommendations (#17657)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-08 04:18:30 +08:00
kevin-wu24 aa4782aea3
KAFKA-17576 Fix all references to kraft/server.properties to use reconfig-server.properties (#17567)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-08 03:58:21 +08:00
Bill Bejeck c69a6b0e80
KAFKA-17248 - KIP 1076 Add process-id to get carried to telemetry results (#17630)
This PR adds the processId to Kafka Streams client instance metrics

Reviewers: Matthias Sax <mjsax@apache.org>
2024-11-07 12:12:42 -05:00
Abhinav Dixit a0d4cbec40
KAFKA-17743: Add minBytes implementation to DelayedShareFetch (#17539)
Reviewers:  Apoorv Mittal <apoorvmittal10@gmail.com>, Jun Rao <junrao@gmail.com>
2024-11-07 07:57:00 -08:00