Commit Graph

14137 Commits

Author SHA1 Message Date
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
kevin-wu24 c5a31cd6fb
KAFKA-17625: Removing explicit ZK test parameterizations (#17638)
This PR removes ZK test parameterizations from ducktape by:

- Removing zk from quorum.all_non_upgrade
- Removing quorum.zk from @matrix and @parametrize annotations
- Changing usages of quorum.all to quorum.all_kraft
- Deleting message_format_change_test.py

The default metadata_quorum value still needs to be changed to KRaft rather than ZK, but this will be done in a follow-up PR.

Reviewers: Kirk True <kirk@kirktrue.pro>, Colin P. McCabe <cmccabe@apache.org>
2024-11-04 09:38:04 -08:00
Chia-Chuan Yu fa124385b8
KAFKA-17906 Remove redundant sourceSets from build.gradle (#17672)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-04 23:44:58 +08:00
David Arthur cbf440dfd0
KAFKA-17767 Parse quarantined tests and display them [4/n] (#17661)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-04 23:33:55 +08:00
David Jacot 5cf91e4cbe
KAFKA-17593; [3/N] Track the number of subscribed members per regular expression in ConsumerGroup (#17653)
This patch adds a data structure to ConsumerGroup to track the number of members subscribed to each regular expressions in the group. This will be useful to know whether a regex is new in the group or whether a regex must be removed from the group.

Reviewers: Jeff Kim <jeff.kim@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
2024-11-04 06:39:09 -08:00
David Jacot 64f3ee4c33
KAFKA-17593; [2/N] Update request validation & validate regex (#17651)
This patch does two things:
1) Change the validation of the ConsumerGroupHeartbeat request to accept subscribed topic names and/or subscribed topic regex. At least of them must be set in the first request with epoch 0.
2) Validate the provided regular expression by compiling it.

Co-authored-by: Lianet Magrans <lmagrans@confluent.io>

Reviewers: Jeff Kim <jeff.kim@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
2024-11-04 06:38:09 -08:00
Yung 8eb8301294
KAFKA-17919 enable back the failing testShareGroups test (#17658)
Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-04 21:11:34 +08:00
Apoorv Mittal a0292bae39
KAFKA-17463 add retry in Persister for NOT_COORDINATOR error (#17645)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-04 21:06:39 +08:00
Andrew Schofield 0707c1fde2
KAFKA-17908 Tweak log messages in group metadata manager (#17652)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-04 06:16:56 +08:00
Ken Huang f7f4e5b5b1
KAFKA-17882 improve the document about "default value" of tagged structure field (#17618)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-04 05:46:20 +08:00
TengYao Chi 7b41eedc1a
KAFKA-17909 Remove zkBroker from ConsumerGroupHeartbeatRequest and ConsumerGroupDescribeRequest (#17665)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-04 04:35:22 +08:00
Yung 0799715f2c
KAFKA-17795 Fix the file path of suppressions.xml to run build on windows (#17674)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-03 21:36:11 +08:00
Linsiyuan9 af53758746
KAFKA-17814 Use `final` declaration to replace the suppression `this-escape` (#17613)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-03 15:00:02 +08:00
Bill Bejeck 908dfa30d7
MINOR: Update clientInstanceIds from EOS_V2 refactor (#17664)
Updates KafkaStreams.clientInstanceIds method to correctly populate the client-id -> clientInstanceId map that was altered in a previous refactoring.

Added a test that confirms ClientInstanceIds is correctly storing consumer and producer instance ids

Reviewers: Matthias Sax <mjsax@apache.org>
2024-11-02 10:37:46 -04:00
Mahsa Seifikar dafa126223
MINOR: fix the class name of UnattachedStateWithVoteTest to match the file name (#17662)
Reviewers: Colin P. McCabe <cmccabe@apache.org>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-02 13:46:21 +08:00
Andrew Schofield 3d9f88daf3
KAFKA-17546 Admin.listGroups and kafka-groups.sh (#17626)
This implements the kafka-groups.sh tool and Admin.listGroups method defined in KIP-1043.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-02 05:37:04 +08:00
Mahsa Seifikar b864a66439
MINOR: Add logging for ReplicationControlManager topic deletion (#17617)
Reviewers: Colin P. McCabe <cmccabe@apache.org>
2024-11-01 12:24:22 -07:00
kevin-wu24 568b9e8a6c
KAFKA-17803: LogSegment#read should return the base offset of the batch that contains startOffset rather than startOffset (#17528)
Reviewers: Jose Sancio <jsancio@gmail.com>, Jun Rao <junrao@gmail.com>
2024-11-01 09:32:00 -07:00
Ritika Reddy e14a81b4b2
KAFKA-14562 [2/3]: Implement epoch bump after every transaction (KIP-890) (#17402)
This patch includes changes to the clients end transaction response handling when transaction version 2 is enabled.
Version 5+ of the End Txn Response includes the producer Id and the producer epoch fields.

Upon receiving the request, the client updates its producer Id and epoch according to the response.

On receiving an EndTxnRequest the server would've either:

Bumped the epoch for the given producer ID.
On epoch overflow, sent a new producer Id with epoch 0.
This patch also includes changes to the endTxnRequest to send the right request version based on whether txnV2 is enabled.

There was a test failure in the integration tests that allowed us to catch a bug in the PrepareComplete method where we update the transit metadata incorrectly. Added the bug fix in this patch where the lastProducerEpoch is updated correctly.

Reviewers: Artem Livshits <alivshits@confluent.io>, Justine Olshan <jolshan@confluent.io>
2024-11-01 08:12:00 -07:00
David Arthur 2696a6d7a1
KAFKA-17767 Load test catalog data [3/n] (#17654)
Add a new "load-catalog" job to the workflow. This job will checkout the test-catalog branch at 7 days prior and generate a text file of all the tests that were known at that time. This file is then passed down to the two parallel "test" jobs to be used as a source of data for the quarantined test behavior.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-01 10:38:47 -04:00
PoAn Yang 5a3b544d61
KAFKA-17880 Move integration test from streams module to streams/integration-tests module (#17615)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-01 18:21:06 +08:00
Andrew Schofield 346fdbafc5
KAFKA-17912 Align string representations of SharePartitionKey (#17656)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-01 15:43:32 +08:00
Jonah Hooper 18b8b992f9
[KAFKA-17870] Fail CreateTopicsRequest if total number of partitions exceeds 10k (#17604)
We fail the entire CreateTopicsRequest action if there are more than 10k total
partitions being created in this topic for this specific request. The usual pattern for
this API to try and succeed with some topics. Since the 10k limit applies to all topics
then no topic should be created if they all exceede it.

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2024-10-31 13:54:03 -07:00
TengYao Chi 6f040cabc7
KAFKA-17116 New consumer may not send effective leave group if member ID received after close (#17549)
KIP-1082 (https://cwiki.apache.org/confluence/display/KAFKA/KIP-1082%3A+Require+Client-Generated+IDs+over+the+ConsumerGroupHeartbeat+RPC)

Reviewers: Andrew Schofield <aschofield@confluent.io>, David Jacot <djacot@confluent.io>, Lianet Magrans <lianetmr@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-11-01 03:03:17 +08:00
TengYao Chi ea7da09e53
KAFKA-17899 Add more unit tests for NetworkReceive (#17637)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-01 02:38:43 +08:00
Yung 6094882315
KAFKA-17905 Remove the specified type of using lambda for BaseFunction (#17648)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-01 02:33:16 +08:00
David Arthur dd432c0ca1
MINOR: Add links test catalog commits (#17650)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-11-01 00:53:02 +08:00
David Arthur 7c536c9643
Mark PlaintextAdminIntegrationTest#testShareGroups as flaky (#17649)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Ron Dagostino <rndgstn@gmail.com>
2024-10-31 10:19:14 -04:00
Yung 0ba6f3212d
KAFKA-17903 Remove KafkaFuture#Function and KafkaFuture#thenApply (#17644)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-31 14:45:02 +08:00
Bill Bejeck 45982186dc
MINOR: Revert "Temporarily update Vagrantfile to Java 11" (#17642)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-31 13:23:04 +08:00
Apoorv Mittal ff116df015
KAFKA-17002: Integrated partition leader epoch for Persister APIs (KIP-932) (#16842)
The PR integrates leader epoch for partition while invoking Persister APIs. The write RPC is retried once on leader epoch failure.

Reviewers: Abhinav Dixit <adixit@confluent.io>, Andrew Schofield <aschofield@confluent.io>, Jun Rao <junrao@gmail.com>, David Arthur <mumrah@gmail.com>
2024-10-30 14:41:39 -07:00
PoAn Yang fb65dfeb11
KAFKA-17726: New consumer subscribe/subscribeFromPattern in background thread (#17569)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
2024-10-30 22:15:13 +01:00
David Arthur 4fadec527d
MINOR: Quarantine the worst flaky tests (#17639)
Using the last 7 days of data on Oct 30 2024, this patch marks all flaky tests with more than 10% flakiness on trunk.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-30 17:02:04 -04:00
David Arthur 835f256f70
MINOR: Don't run update-test-catalog on PRs (#17640)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-30 16:57:49 -04:00
Bill Bejeck 29881782c8
KAFKA-17609 Migrate broker compatibility test from ZK to KRaft (#17603)
Reviewers: Matthias J. Sax <matthias@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-10-31 04:51:06 +08:00
Mickael Maison d7135b2a5b
MINOR: Various cleanups in metadata (#17633)
Reviewers: David Arthur <mumrah@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-10-31 02:48:33 +08:00
Ken Huang 30b1bdfc74
KAFKA-17835 Move ProducerIdManager and RPCProducerIdManager to transaction-coordinator module (#17562)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-31 02:40:47 +08:00
David Arthur 68c6c6da86
KAFKA-17767 Store the test catalog in Git [2/n] (2nd attempt) (#17627)
This patch adds a CI job to store our test catalog in an orphaned branch named "test-catalog" within this repo. 
This data will be used to help determine which tests should be quarantined.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-30 13:50:42 -04:00
Josep Prat 5859df9ee0
MINOR: Add Kafka 3.8.1 to system tests (#17629)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-31 01:00:37 +08:00