Commit Graph

14175 Commits

Author SHA1 Message Date
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
PoAn Yang b213c64f97
KAFKA-17480: New consumer commit all consumed should retrieve offsets in background thread (#17150)
Reviewers: Lianet Magrans <lmagrans@confluent.io>, Kirk True <ktrue@confluent.io>, TengYao Chi <kitingiao@gmail.com>
2024-11-07 15:45:44 +01:00
ShivsundarR 0181073d49
KAFKA-17933: Added round trip trogdor workload for share consumer. (#17692)
Added ShareRoundTripWorker.java similar to RoundTripWorker.java. This will start a producer and a share consumer on a single node. The share consumer reads back the messages produced by the producer.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-07 16:21:14 +05:30
Matthias J. Sax f2b19baee0
KIP-16331: Remove EOS-v1 from StreamsConfigUtils (#17691)
Reviewers: Bill Bejeck <bill@confluent.io>
2024-11-06 18:18:49 -08:00
Colin Patrick McCabe e0f75a1e50
Update docker_scan.yml for 3.9.0 (#17708)
Reviewers: Justine Olshan <jolshan@confluent.io>
2024-11-06 16:40:16 -08:00
Colin Patrick McCabe e0e26aeff9
MINOR: update .asf.yaml contributors (#17707)
Reviewers: Justine Olshan <jolshan@confluent.io>
2024-11-06 16:39:53 -08:00
Bill Bejeck d170b52362
KAFKA-17635: Ensure only committed offsets are returned for purging (#17686)
Kafka Streams actively purges records from repartition topics. Prior to this PR, Kafka Streams would retrieve the offset from the consumedOffsets map, but here are a couple of edge cases where the consumedOffsets can get ahead of the commitedOffsets map. In these cases, this means Kafka Streams will potentially purge a repartition record before it's committed.

Updated the current StreamTask test to cover this case

Reviewers: Matthias Sax <mjsax@apache.org>
2024-11-06 17:45:27 -05:00
Andrew Schofield 8cbd2edfe7
KAFKA-17896: Admin.describeClassicGroups (#17680)
The implementation of Admin.describeClassicGroups from KIP-1043.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-06 17:14:10 +05:30
Mickael Maison c40cb07984
KAFKA-17911: Fix handling of env variables in KafkaDockerWrapper (#17655)
Reviewers: Luke Chen <showuon@gmail.com>
2024-11-06 10:47:51 +01:00
wperlichek 688c2c0913
MINOR: Fix broken hyperlink for producer API in documentation (#17701)
Reviewers: Divij Vaidya <diviv@amazon.com>
2024-11-06 10:26:36 +01:00
Yung b7e69ebf5c
KAFKA-17924: Remove `bufferpool-wait-time-total`, `io-waittime-total`, and `iotime-total` (#17697)
These metrics were deprecated in KIP-773 and are being removed in Kafka 4.0.

Reviewers:  Chia-Ping Tsai <chia7712@gmail.com>, Divij Vaidya <diviv@amazon.com>
2024-11-06 08:46:28 +01:00
Abhishek Giri c903bdf496
KAFKA-12827 Remove Deprecated method KafkaStreams#setUncaughtExceptionHandler (#16988)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2024-11-05 22:08:32 -08:00
Joao Pedro Fonseca Dantas 069667b6b2
KAFKA-16339: [1/4 KStream#transform] Remove Deprecated "transformer" methods and classes (#17198)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2024-11-05 22:04:41 -08:00
Ted Yan bc3e6369b9
KAFKA-17931 Revise the `specifying-test-retries` section in README (#17679)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-06 11:09:09 +08:00
TaiJuWu 3e093062d2
MINOR: Add an instruction to run test with specific times (#17678)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-06 10:49:37 +08:00
xijiu 695f3aa03c
KAFKA-17936 Refactor SslTransportLayerTest#testDsaKeyPair to avoid skip test (#17682)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-06 10:42:08 +08:00
kevin-wu24 5ec9dffa81
KAFKA-17916: removing ZK from connect ducktape tests (#17689)
Migrates existing connect tests that were using Zookeeper to use KRaft
instead, and cleans up some dead ZK code. For broker compatibility tests,
tests for versions 2.1-2.3 still need to use ZK.

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2024-11-05 14:33:17 -08:00
Vincent Jiang 08c876c1fe
Fix TransactionStateManager handling of empty batch when loading transaction metadata (#17688)
When loading transaction metadata from a transaction log partition, if the partition contains a segment ending with an empty batch, "currOffset" update logic at will be skipped for the last batch. Since "currOffset" is not advanced to next offset of last batch properly, TransactionStateManager.loadTransactionMetadata method will be stuck in the "while" loop.

This change fixes the issue by updating "currOffset" after processing each batch, whether the batch is empty or not.

Reviewers: Justine Olshan <jolshan@confluent.io>, Jun Rao <junrao@gmail.com>
2024-11-05 14:22:20 -08:00
Bill Bejeck 4ed0a958e5
KAFKA-17248 - KIP 1076 implementation (#17021)
Implementation of KIP-1076 to allow for adding client application metrics to the KIP-714 framework

Reviewers: Apoorv Mittal <amittal@confluent.io>, Andrew Schofield <aschofield@confluent.io>, Matthias Sax <mjsax@apache.org>
2024-11-05 11:29:54 -05:00
Bill Bejeck 36c131ef4a
KAFKA-17609:[1/4] Changes needed to convert system tests to use KRaft and remove ZK (#17275)
This is part one of a multi-pr effort to convert Kafka Streams system tests to KRaft. I decided to break down the changes into multiple PRs to reduce the review load

Reviewers: Matthias Sax <mjsax@apache.org>
2024-11-05 11:23:33 -05:00
Saxon Chen 8c62c2a0f3
MINOR: Fix typo in comments of EndToEndAuthorizationTest (#17693)
Reviewers: Divij Vaidya <diviv@amazon.com>
2024-11-05 16:27:59 +01:00
TaiJuWu ee3cea05aa
KAFKA-16816: Remove unneeded FencedInstanceId support on commit path for new consumer (#17559)
Reviewers: Lianet Magrans <lmagrans@confluent.io>
2024-11-05 14:33:23 +01:00
Calvin Liu c91243a4b7
KAFKA-17877; Only call once maybeSendResponseCallback for each marker (#17619)
We should only call once `maybeSendResponseCallback` for each marker during the WriteTxnMarkersRequest handling.

Consider the following 2 cases:

First
We have 2 markers to append, one for producer-0, one for producer-1
When we first process producer-0, it appends a marker to the __consumer_offset.
The __consumer_offset append finishes very fast because the group coordinator is no longer the leader. So the coordinator directly returns NOT_LEADER_OR_FOLLOWER. In its callback, it calls the maybeComplete() for the first time, and because there is only one partition to append, it is able to go further to call maybeSendResponseCallback() and decrement numAppends.
Then it calls the replica manager append for nothing, in the callback, it calls the maybeComplete() for the second time. This time, it also decrements numAppends.

Second
We have 2 markers to append, one for producer-0, one for producer-1
When we first process producer-0, it appends a marker to the __consumer_offset and a data topic foo.
The 2 appends will be handled by group coordinator and replica manager asynchronously.
It can be a race that, both appends finishes together, then they can fill the `markerResults` at the same time, then call the  `maybeComplete`. Because the `partitionsWithCompatibleMessageFormat.size == markerResults.size` condition is satisfied, both `maybeComplete` calls can go through to decrement the `numAppends` and cause a premature response.

Note: the problem only happens with KIP-848 coordinator enabled.

Reviewers: Jeff Kim <jeff.kim@confluent.io>, Justine Olshan <jolshan@confluent.io>, David Jacot <djacot@confluent.io>
2024-11-05 02:06:32 -08:00
ShivsundarR fd4d58899b
KAFKA-17819 : Handle piggyback acknowledgements when subscription changes in ShareConsumeRequestManager. (#17537)
Currently in ShareConsumeRequestManager, after we receive a ShareFetchResponse, if the subscription changes before we acknowledge(via ShareFetch), then we do not acknowledge the records which are not part of the updated subscription. Instead we must acknowledge all the records that we had received irrespective of the current subscription.
This bug is only when we are acknowledging via ShareFetch where we use SubscriptionState::fetchablePartitions to obtain the partitions to fetch. In ShareAcknowledge, as we are getting the partitions from the active share sessions, even if the subscription changed, the session would remain active.


Reviewers:  Andrew Schofield <aschofield@confluent.io>,  Manikumar Reddy <manikumar.reddy@gmail.com>
2024-11-05 13:06:11 +05:30
Kuan-Po Tseng e3f953483c
KAFKA-17857 Move AbstractResetIntegrationTest and subclasses to tools (#17594)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-05 04:16:19 +08:00
kevin-wu24 ebb3202e01
KAFKA-16964 Integration tests for adding and removing voters (#17582)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-05 03:09:37 +08:00