Commit Graph

14587 Commits

Author SHA1 Message Date
David Arthur 649cd6b42c
MINOR Fix conditional in Update Test Catalog workflow (#18289)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-24 09:05:37 -05:00
Kuan-Po Tseng 5a4590c020
KAFKA-18338 add log4j.yaml to test-common-api and remove unsed log4j.properties from test-common (#18294)
Reviewers: TengYao Chi <kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-24 16:22:47 +08:00
Jhen-Yung Hsu a940d52070
KAFKA-18342 Use `File.exist` instead of `File.exists` to ensure the `Vagrantfile` works with Ruby 3.2+ (#18306)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-24 15:04:42 +08:00
Logan Zhu 4d6535e60d
KAFKA-18290 Remove deprecated methods of FeatureUpdate (#18246)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-24 14:53:32 +08:00
Nick Guo 1a3dce72fa
KAFKA-18289 Remove deprecated methods of DescribeTopicsResult (#18255)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-24 01:48:15 +08:00
Nick Guo 1cf514313e
KAFKA-18291 Remove deprecated methods of ListConsumerGroupOffsetsOptions (#18265)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-24 01:37:10 +08:00
Ismael Juma 6fc5c64928
MINOR: Various README tweaks (#18301)
1. Fix ambiguous statement where it could be interpreted that scalac is used for the clients module
2. Remove "in KRaft mode" because that's the only mode
3. Put IntelliJ first in IDE section and only mention the native gradle integration
4. Restore instructions for installing all projects to the local Maven repo, this was accidentally removed as part of the Scala 2.12 support removal.
2024-12-23 06:58:26 -08:00
Logan Zhu e0f35e025a
KAFKA-18278: Correct name and description for run-gradle step (#18223)
Reviewers: David Arthur <mumrah@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-23 09:50:08 -05:00
Sanskar Jhajharia de7a75a978
MINOR: Fix the failure in streams:testAll (#18303)
Currently, the command ./gradlew :streams:testAll as suggested in README is failing with an error. Following this commit, the command is able to pass and start running the tests in streams suite.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Lucas Brutschy <lbrutschy@confluent.io>
2024-12-23 15:35:08 +01:00
Ismael Juma 2e1134284c
MINOR: Add release note for Java 17 requirement (#18302)
Also remove confusing comment related to connect & Java 17 from build.gradle.
I also updated KIP-1013 to note the implications of KIP-1032.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-22 19:36:03 -08:00
PoAn Yang b4be178599
KAFKA-17393: Remove log.message.format.version/message.format.version (KIP-724) (#18267)
Based on [KIP-724](https://cwiki.apache.org/confluence/display/KAFKA/KIP-724%3A+Drop+support+for+message+formats+v0+and+v1), the `log.message.format.version` and `message.format.version` can be removed in 4.0.

These configs effectively a no-op with inter-broker protocol version 3.0 or higher
since Apache Kafka 3.0, so the impact should be minimal.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2024-12-21 15:35:15 -08:00
Justine Olshan 8bd3746e0c
KAFKA-17705: Add Transactions V2 system tests and mark as production ready (#18132)
Added transaction version 2 to some of the system tests. Also marking TV2 as production ready.

Also fixes the defaultVersion test. 

Reviewers: Jun Rao <jun@confluent.io>
2024-12-21 14:01:54 -08:00
Ismael Juma fe56fc98fa
KAFKA-18269: Remove deprecated protocol APIs support (KIP-896, KIP-724) (#18218)
Included in this change:
1. Remove deprecated protocol api versions from json files.
3. Remove fields that are no longer used from json files (affects ListOffsets, OffsetCommit, DescribeConfigs).
4. Remove record down-conversion support from KafkaApis.
5. No longer return `Errors.UNSUPPORTED_COMPRESSION_TYPE` on the fetch path[1].
6. Deprecate `TopicConfig. MESSAGE_DOWNCONVERSION_ENABLE_CONFIG` and made the relevant
configs (`message.downconversion.enable` and `log.message.downcoversion.enable`) no-ops since
down-conversion is no longer supported. It was an oversight not to deprecate this via KIP-724.
7. Fix `shouldRetainsBufferReference` to handle null request schemas for a given version.
8. Simplify producer logic since it only supports the v2 record format now.
9. Fix tests so they don't exercise protocol api versions that have been removed.
10. Add upgrade note.

Testing:
1. System tests have a lot of failures, but those tests fail for trunk too and I didn't see any issues specific to this change - it's hard to be sure given the number of failing tests, but let's not block on that given the other testing that has been done (see below).
3. Java producers and consumers with version 0.9-0.10.1 don't have api versions support and hence they fail in an ungraceful manner: the broker disconnects and the clients reconnect until the relevant timeout is triggered.
4. Same thing seems to happen for the console producer 0.10.2 although it's unclear why since api versions should be supported. I will look into this separately, it's unlikely to be related to this PR.
5. Console consumer 0.10.2 fails with the expected error and a reasonable message[2].
6. Console producer and consumer 0.11.0 works fine, newer versions should naturally also work fine.
7. kcat 1.5.0 (based on librdkafka 1.1.0) produce and consume fail with a reasonable message[3][4].
8. kcat 1.6.0-1.7.0 (based on librdkafka 1.5.0 and 1.7.0 respectively) consume fails with a reasonable message[5].
9. kcat 1.6.0-1.7.0 produce works fine.
10. kcat 1.7.1  (based on librdkafka 1.8.2) works fine for consumer and produce.
11. confluent-go-client (librdkafka based) 1.8.2 works fine for consumer and produce.
12. I will test more clients, but I don't think we need to block the PR on that.

Note that this also completes part of KIP-724: produce v2 and lower as well as fetch v3 and lower are no longer supported.

Future PRs will remove conditional code that is no longer needed (some of that has been done in KafkaApis,
but only what was required due to the schema changes). We can probably do that in master only as it does
not change behavior.

Note that I did not touch `ignorable` fields even though some of them could have been
changed. The reasoning is that this could result in incompatible changes for clients
that use new protocol versions without setting such fields _if_ we don't manually
validate their presence. I will file a JIRA ticket to look into this carefully for each
case (i.e. if we do validate their presence for the appropriate versions, we can
set them to ignorable=false in the json file).

[1] We would return this error if a fetch < v10 was used and the compression topic config was set
to zstd, but we would not do the same for the case where zstd was compressed at the producer
level (the most common case). Since there is no efficient way to do the check for the common
case, I made it consistent for both by having no checks.
[2] ```org.apache.kafka.common.errors.UnsupportedVersionException: The broker is too new to support JOIN_GROUP version 1```
[3]```METADATA|rdkafka#producer-1| [thrd:main]: localhost:9092/bootstrap: Metadata request failed: connected: Local: Required feature not supported by broker (0ms): Permanent```
[4]```METADATA|rdkafka#consumer-1| [thrd:main]: localhost:9092/bootstrap: Metadata request failed: connected: Local: Required feature not supported by broker (0ms): Permanent```
[5] `ERROR: Topic test-topic [0] error: Failed to query logical offset END: Local: Required feature not supported by broker`

Reviewers: David Arthur <mumrah@gmail.com>
2024-12-20 19:52:00 -08:00
Ismael Juma 288d4de834
KAFKA-18334: Produce v4-v6 should be undeprecated (#18288)
Librdkafka totally breaks if produce v3 is removed - it starts sending records with record format v0.
These api versions have to be undeprecated - KIP-896 has been updated.

Reviewers: David Arthur <mumrah@gmail.com>
2024-12-20 16:59:51 -08:00
Matthias J. Sax 8c21857877
KAFKA-13722: code cleanup after deprecated StateStore.init() was removed (#18249)
We remove the deprecated overload of StateStore.init() and thus do not
need to cast any longer. This PR removes all unnecessary casts, and
additionally cleans ups all related classed to reduce warnings.

Reviewers: Bill Bejeck <bill@confluent.io>
2024-12-20 14:31:44 -08:00
Artem Livshits 3ef10a3f61
KAFKA-15370: Support Participation in 2PC (KIP-939) (1/N) (#17687)
This is just a mechanical change to make prepareTransitionTo method use named parameters instead of positional parameters.

Reviewers: Justine Olshan <jolshan@confluent.io>, Ritika Reddy <rreddy@confluent.io>
2024-12-20 14:09:32 -08:00
Chirag Wadhwa 6e61bfee91
KAFKA-18312: Added entityType: topicName to SubscribedTopicNames in ShareGroupHeartbeatRequest.json (#18285)
This PR Adds entityType: topicName to SubscribedTopicNames in ShareGroupHeartbeatRequest.json as per the recent update to kip-932.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2024-12-20 21:31:47 +05:30
PoAn Yang 748ad6a793
HOTFIX: fix incompatible types: Optional<TimestampAndOffset> cannot be converted to Option<TimestampAndOffset> (#18284)
Signed-off-by: PoAn Yang <payang@apache.org>

Reviewers: Christo Lolov <lolovc@amazon.com>
2024-12-20 14:57:33 +00:00
David Arthur af5d6c2578
MINOR Fix some test-catalog issues (#18272)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-20 08:42:57 -05:00
Ken Huang e8863c9ee2
KAFKA-18180: Move OffsetResultHolder to storage module (#18100)
Reviewers: Christo Lolov <lolovc@amazon.com>
2024-12-20 11:52:34 +00:00
David Jacot d67379c310
KAFKA-18301; Make coordinator records first class citizen (#18261)
This patch is the first one in a series to improve how coordinator records are managed. It focuses on making coordinator records first class citizen in the generator.
* Introduce `coordinator-key` and `coordinator-value` in the schema;
* Introduce `apiKey` for those. This is done to avoid relying on the version to determine the type.
* It also allows the generator to enforce some rules: the key cannot use flexible versions, the key must have a single version `0`, there must be a key and a value for a given api key, etc.
* It generates an enum with all the coordinator record types. This is pretty handy in the code.

The patch also updates the group coordinators to use those.

Reviewers: Jeff Kim <jeff.kim@confluent.io>, Andrew Schofield <aschofield@confluent.io>
2024-12-20 12:16:14 +01:00
PoAn Yang 753a003480
KAFKA-18262 Remove DefaultPartitioner and UniformStickyPartitioner (#18204)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-20 15:33:51 +08:00
Kuan-Po Tseng e9d4aa4cfe
KAFKA-18296 Remove deprecated KafkaBasedLog constructor (#18257)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-20 15:14:45 +08:00
Matthias J. Sax f7ae4e8b71
KAFKA-12829: Remove old Processor and ProcessorSupplier interfaces (#18238)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Bill Bejeck <bill@confluent.io>
2024-12-19 22:26:17 -08:00
ClarkChen bd27e34f2d
KAFKA-18292 Remove deprecated methods of UpdateFeaturesOptions (#18245)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-20 11:26:45 +08:00
Matthias J. Sax 9aa900f076
KAFKA-12829: Remove deprecated Topology#addProcessor of old Processor API (#18154)
Reviewers: John Huang <pegasashjy@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, Bill Bejeck <bill@confluent.io>, Lucas Brutschy <lbrutschy@confluent.io>
2024-12-19 16:05:16 -08:00
Justine Olshan e099fce567
KAFKA-18035, KAFKA-18306, KAFKA-18092: Address TransactionsTest flaky tests (#18264)
A lot of these tests assumed that the commit/abort happened immediately. Spoiler alert -- it does not.

For some I ensure that the first send of the next transaction is successful before grabbing the epoch. I also loosened some checks since we don't need to guarantee the exact epoch.

I went back and forth with completely deleting testBumpTransactionalEpochWithTV2Enabled since we don't have client side epoch bumps with V2 (which is what the test was originally testing), but I opted to keep it to just confirm the epoch on each transaction -- even in the timeout scenario.

Reviewers: Calvin Liu <caliu@confluent.io>, Artem Livshits <alivshits@confluent.io>, Jeff Kim <jeff.kim@confluent.io>, David Mao <dmao@confluent.io>
2024-12-19 14:06:37 -08:00
Jeff Kim cd08129f3d
MINOR: change the default linger time in the new coordinator (#18274) 2024-12-19 16:54:23 -05:00
kevin-wu24 9f67ee3a9d
KAFKA-18305: validate controller.listener.names is not in inter.broker.listener.name for kcontrollers (#18222)
When inter.broker.listener is explicitly set, validate that it is not in the set of controller.listener.names.

Reviewers: Colin P. McCabe <cmccabe@apache.org>, David Arthur <mumrah@gmail.com>
2024-12-19 13:29:38 -08:00
Mickael Maison 3fafa096b1
KAFKA-18207: Serde for handling transaction records (#18136)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2024-12-19 21:39:09 +01:00
Matthias J. Sax b3b40bb77b
KAFKA-13722: Refactor Kafka Streams store interfaces (#18243)
Refactor Segments and TimestampedSegments to not use old
ProcessorContext any longer.

Reviewers: Bruno Cadonna <bruno@confluent.io>
2024-12-19 11:55:57 -08:00
Matthias J. Sax fe9847dd4a
KAFKA-17131: Refactor TimeDefinitions (#18241)
Refactor TimeDefintiions to not use old ProcessorContext any longer.

Reviewers: Bruno Cadonna <bruno@confluent.io>
2024-12-19 11:40:43 -08:00
David Jacot b31aa65115
MINOR: Fix MessageFormatters (#18266)
While looking at the message formatters in https://github.com/apache/kafka/pull/18261, I have noticed at few incorrect test cases.
* We should not log anything when the record type is unknown because the formatters have clear goals.
* We should not parse the value when the key is null or when the key cannot be parsed. While it works in the tests, in practice, this is wrong because we cannot assume that type of the value if the type of the key is not defined. The key drives the type of the entire record.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-19 16:12:50 +01:00
David Arthur 64279d2e82
Mark flaky tests for Dec 18, 2024 (#18263)
Reviewers: TengYao Chi <kitingiao@gmail.com>, Andrew Schofield <aschofield@confluent.io>
2024-12-19 10:12:33 -05:00
Ismael Juma 22d1ba8265
KAFKA-18270: FindCoordinator v0 incorrectly tagged as deprecated (#18262)
It's now consistent with KIP-896.
2024-12-19 06:25:17 -08:00
Bruno Cadonna 4a6c6d1a1e
KAFKA-18284: Add group coordinator records for Streams rebalance protocol (#18228)
KIP-1071 specifies records that the group coordinator needs to store
into the consumer offset topic to persist the state of a Streams
group. This records are specified in json files from which the actual
classes for the records are generated.

This commit adds the records needed by the group coordinator to store
the state of a Streams group.

Reviewer: Lucas Brutschy <lbrutschy@confluent.io>
2024-12-19 09:03:33 +01:00
Bruno Cadonna a0291a8d50
MINOR: Fix flaky state updater test (#18253)
The tests are flaky because the tests end before the verified calls
are executed. This happens because the state updater thread executes
the verified calls, but the thread that executes the
tests with the verifications is a different thread.

This commit fixes the flaky tests by enusring that the calls were
performed by the state updater by either shutting down the state
updater or waiting for the condition.

Reviewers: Lucas Brutschy <lbrutschy@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2024-12-19 09:02:38 +01:00
Matthias J. Sax a9eb06bbdf
MINOR: improve StreamsResetter logging (#18237)
StreamsResetter should log the deprecation warning only if the deprecated
flag is used.

Reviewers: Bruno Cadonna <bruno@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-18 18:29:42 -08:00
Justine Olshan f7f3cffb48
KAFKA-18227: Ensure v2 partitions are not added to last transaction during upgrade (#18176)
We want to bump the epoch if we are upgrading to TV2. Given that we already have code in place for this, I thought we could piggyback on the completing transaction epoch bump logic. For just initializing producers, I moved the check to the end of InitTransaction. Note, we have do do this check after we initialize the producer ID to ensure we have updated ApiVersions correctly.

Reviewers: Calvin Liu <caliu@confluent.io>, Artem Livshits <alivshits@confluent.io>, Jeff Kim <jeff.kim@confluent.io>
2024-12-18 16:15:08 -08:00
Peter Lee 3bc366f1a4
Add IT for share consumer with duration base offet auto reset (#18251)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2024-12-18 21:47:38 +00:00
Lucas Brutschy 0055ef0a49
KAFKA-18283: Add StreamsGroupDescribe RPC definitions (#18230)
Adds a new RPC StreamsGroupDescribe that returns, given the group ID, all metadata related to the streams group, such as

 - The topology metadata of the group.
 - The topology epoch of the group.
 - The latest member metadata that each member provided through the StreamsGroupHeartbeat API.
 - The current target assignment generated by the assignor.
 - This just adds the JSON as defined in KIP-1071, together with some plumbing.

Reviewers: Bill Bejeck <bbejeck@gmail.com>
2024-12-18 19:38:01 +01:00
Ken Huang 08efe735a4
KAFKA-18241: add docs check to CI (#18183)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Arthur <mumrah@gmail.com>
2024-12-18 13:20:29 -05:00
santhoshct 8150e7bf79
KAFKA-18223 Improve flaky test report (#18212)
Add tables for all sections of the report and add links to Develocity.

Reviewers: David Arthur <mumrah@gmail.com>
2024-12-18 13:18:57 -05:00
David Arthur 5e9605a27d
MINOR Remove triage label in nightly job (#18147)
For PRs that have been reviewed (by anyone, not just a committer), remove the "triage" label. This job runs once per night.

Reviewers: Justine Olshan <jolshan@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-18 13:13:15 -05:00
Nick Guo 0163fa2d06
KAFKA-18294 Remove deprecated SourceTask#commitRecord (#18260)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-19 01:06:33 +08:00
Nick Guo 21b7bb2265
KAFKA-18264 Remove NotLeaderForPartitionException (#18211)
Reviewers: Yung <yungyung7654321@gmail.com>, Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-19 00:56:13 +08:00
Matthias J. Sax e551cb7bb3
KAFKA-13722: Refactor SerdeGetter (#18242)
Reviewers: Bruno Cadonna <cadonna@apache.org>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-18 19:01:46 +08:00
Chung, Ming-Yen 90ff97b51d
KAFKA-18094 Remove deprecated TopicListing(String, Boolean) (#18248)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-18 18:45:21 +08:00
Lucas Brutschy ec32c8a376
KAFKA-18282: Add StreamsGroupHeartbeat RPC definitions (#18227)
The StreamsGroupHeartbeat API is the new core API used by streams application to form a group. The API allows members to initialize a topology, advertise their state, and their owned tasks. The group coordinator uses it to assign/revoke tasks to/from members. This API is also used as a liveness check.

This change adds the JSON definition of the RPC, as defined in KIP-1071.

Reviewers: Bruno Cadonna <cadonna@apache.org>
2024-12-18 11:43:44 +01:00
Almog Gavra 4bcbf9fae7
KAFKA-18026: KIP-1112 migrate KTableSuppressProcessorSupplier (#18150)
Migrates KTableSuppressProcessorSupplier to use the the ProcessorSupplier#stores() method

Reviewers: Guozhang Wang <guozhang.wang.us@gmail.com>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2024-12-17 23:45:49 -08:00