Commit Graph

14404 Commits

Author SHA1 Message Date
David Arthur d4a22ef5c6 Revert "remove failure afterTask"
This reverts commit 6bf8786d9e.
2024-12-05 16:49:51 -05:00
David Arthur 6bf8786d9e
remove failure afterTask 2024-12-05 16:47:28 -05:00
David Arthur 967e16e304
Update build.gradle 2024-12-05 15:58:57 -05:00
David Arthur 0043e92f0e
MINOR Ensure quarantinedTest always copies test reports 2024-12-05 15:53:28 -05:00
David Arthur 0f2a968790
MINOR: Increase Gradle daemon heap size to 4Gb (#18067)
Reviewers: Lianet Magrans <lmagrans@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-06 04:29:39 +08:00
Nick Guo 970d8930ac
KAFKA-18159 Remove onPartitionsRevoked and onPartitionsAssigned from SinkTask (#18049)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-06 04:28:34 +08:00
Yung bdd36f0adb
KAFKA-18140 Remove ZooKeeperMainWithTlsSupportForKafka (#18022)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-06 04:11:10 +08:00
Abhinav Dixit e663c3857a
KAFKA-18129: `SharePartition#maybeInitialize` should complete the future outsize the write lock (#18053)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Apoorv Mittal <apoorvmittal10@gmail.com>
2024-12-05 20:01:00 +00:00
Dongnuo Lyu e30edb3eff
KAFKA-18052: Decouple the dependency of feature stable version to the metadata version (#17886)
Currently the validation of feature upgrade relies on the supported version range generated during registration. For a given feature, its max supported feature version in production is set to be the default version value (the latest feature version with bootstrap metadata value smaller or equal to the latest production metadata value).

This patch introduces a LATEST_PRODUCTION value independent from the metadata version to each feature so that the highest supported feature version can be customized by the feature owner.

The change only applies to dynamic feature upgrade. During formatting, we still use the default value associated the metadata version.

Reviewers: Justine Olshan <jolshan@confluent.io>, Jun Rao <junrao@gmail.com>
2024-12-05 11:07:47 -08:00
A. Sophie Blee-Goldman 09e8fa2dbe
KAFKA-18026: KIP-1112, migrate stream-table joins to use ProcesserSupplier#stores (#18047)
Covers wrapping of processors and state stores for KStream-KTable joins

Reviewers: Almog Gavra <almog@responsive.dev>, Guozhang Wang <guozhang.wang.us@gmail.com>
2024-12-05 10:06:11 -08:00
Yung fa54065298
KAFKA-18086: Enable propagation of the error message when writing state (#17980)
* KAFKA-18086: Enable propagation of the error message when writing state

* Propagate the error message in the writing state when calling SharePartitionManager.acknowledge and SharePartitionManager.releaseSession, and add corresponding tests to verify that the expected error message is propagated.

* Reviewers: Andrew Schofield <aschofield@confluent.io>, Apoorv Mittal <apoorvmittal10@gmail.com>
2024-12-05 17:48:26 +00:00
ShivsundarR 50b6953661
KAFKA-18122 : Added support for ShareConsumeBenchWorker (#17984)
Added ShareConsumeBenchSpec and ShareConsumeBenchWorker similar to ConsumeBenchSpec/ConsumeBenchWorker. This will help us run trogdor workloads for share consumers as well.
Added a sample json workload running 5 share consumers.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Manikumar Reddy <manikumar.reddy@gmail.com>
2024-12-05 18:46:32 +05:30
Josep Prat 2ad111ff3e
MINOR: Add dependencies label automatically to PRs (#18052)
Signed-off-by: Josep Prat <josep.prat@aiven.io>

Reviewers: Divij Vaidya <diviv@amazon.com>
2024-12-05 13:42:13 +01:00
David Jacot e99561e1f3
KAFKA-17593; [10/N] Remove resolved regular expressions when unsubscribed (#17976)
This patch does a few things:
1) It cleans up resolved regular expressions when they are unsubscribed from. It covers the regular leave/fenced paths for the new protocol and it also covers the LeaveGroup API as new members could be removed via the admin API.
2) It ensures that tombstones for  resolved regular expressions are generated on the conversion patch from consumer to classic group.
3) It fixes [KAFKA-18116](https://issues.apache.org/jira/browse/KAFKA-18116) because I faced the same issue while working on the LeaveGroup API. It adds an integration test for this case too.

Reviewers: Dongnuo Lyu <dlyu@confluent.io>, Jeff Kim <jeff.kim@confluent.io>
2024-12-04 23:41:37 -08:00
David Jacot c3506834e9
KAFKA-17598; Command line validation tool for RE2J regex (#18031)
This patch introduces the `--validate-regex` argument to the `kafka-consumer-group` command line tool as defined in KIP-848. The new argument allows the verification of RE2 regular expressions.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
2024-12-04 23:40:32 -08:00
ShivsundarR 8fde6dedea
KAFKA-18155 : Fix bug in response handler for ShareAcknowledge (#18029)
In the response handler for ShareAcknowledge, we are passing the clientResponse.receivedTimeMs() to the handler methods. But when there is a disconnect or when the response received is null, we should be passing the current time instead.

This bug was causing consumer to hang as it did not call the handler methods on disconnect, and further requests were blocked waiting for its completion.

Reviewers: Andrew Schofield <aschofield@confluent.io>,  Apoorv Mittal <apoorvmittal10@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>
2024-12-05 12:59:13 +05:30
Robert Young 41fc058573
MINOR: Add protocol documentation about ApiVersions Fallback behaviour (#17967)
Documents current ApiVersions fallback mechanism

The broker behaviour when it receives an ApiVersionsRequest ahead of it's supported versions is useful to know as an implementor/manipulator of the protocol.

The behaviour contradicts a point documented in the protocol guide. In the fallback case the protocol version of the response is different from the protocol version of the request.

Also spotted a couple of dead links in the table of contents

Signed-off-by: Robert Young <robeyoun@redhat.com>

Reviewers: Luke Chen <showuon@gmail.com>
2024-12-05 11:22:27 +08:00
Ken Huang 2b43c49f51
KAFKA-18050 Upgrade the checkstyle version to 10.20.2 (#17999)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-05 10:59:18 +08:00
Kirk True 4362ab7090
KAFKA-17947: Update currentLag(), pause(), and resume() to update SubscriptionState in background thread (#17699)
Reviewers: Lianet Magrans <lmagrans@confluent.io>
2024-12-04 21:31:44 -05:00
Ken Huang 6ef8b1c4c0
KAFKA-18132 Remove "session.timeout.ms" from connect-distributed.properties to fix connect e2e (#18005)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-05 10:28:03 +08:00
Apoorv Mittal 2d39d5be64
KAFKA-17783: Adding listeners to remove share partition on partition changes (#17796)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>, Jun Rao <junrao@gmail.com>
2024-12-04 15:43:37 -08:00
mingdaoy 0322764ab2
KAFKA-17460 Remove downgrade_test.py (#18038)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-05 07:07:01 +08:00
Vedarth Sharma 6a43a6bddf
MINOR: Fix error in installing docker-compose on docker-builds workflows (#18042)
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-12-04 23:59:55 +05:30
Lianet Magrans bd0ea70912
KAFKA-18096: Allow join with regex if no matching topics (#18024)
Reviewers: David Jacot <djacot@confluent.io>
2024-12-04 11:35:42 -05:00
Vedarth Sharma f80e726e9b
MINOR: Install docker-compose on docker-build workflows (#18037)
Docker tests rely on docker compose. In recent runs it has been observed that github actions does not provide support for docker compose, so we are installing it explicitly in the workflow.
2024-12-04 22:01:05 +05:30
Andrew Schofield 423a6353a8
KAFKA-18025: Rework acquisition lock timeout test (#17985)
Additional work on ShareConsumerTest.testAcquisitionLockTimeoutOnConsumer. First, mark the test as flaky since it fails occasionally and it would be best to get a decent number of passes before assuming it's no longer flaky. Then, change the assertions so that the test checks which records were received before it counts them (we might get too many records because the wrong records are being returned, or because records are actually being duplicated). The rare failures appear to be related to returning too many records, so it would be good to see whether we can learn more about the duplication.

There are a couple of other improvements too. Reducing the number of share-group state partitions so we don't have the overhead of creating 50 partitions when a few will do. Changing the warm-up logic since that has been observed very occasionally to assert.

Reviewers: ShivsundarR <shr@confluent.io>,  Manikumar Reddy <manikumar.reddy@gmail.com>
2024-12-04 20:58:55 +05:30
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