Commit Graph

14533 Commits

Author SHA1 Message Date
David Jacot bc5b627ebb
MINOR: Mark KIP-848's public apis as stable (#18235)
KIP-848 will be release as GA in Apache Kafka 4.0. Hence we need to mark all the related public apis as stable.

Reviewers: Jeff Kim <jeff.kim@confluent.io>
2024-12-17 20:02:23 +01:00
David Arthur 7697d3b826
MINOR Use new Develocity API key secret (#18229)
Instead of parsing the GE_ACCESS_TOKEN, the patch uses the newly minted DV_API_ACCESS secret for Develocity API access.

Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-12-17 13:22:56 -05:00
ShivsundarR e88fede27e
KAFKA-18025 Remove flaky tag from several tests in ShareConsumerTest (#18226)
Develocity report: https://ge.apache.org/scans/tests?search.relativeStartTime=P28D&search.rootProjectNames=kafka&search.tags=github,trunk&search.timeZoneId=America%2FNew_York&tests.container=kafka.test.api.ShareConsumerTest#

Reviewers: David Arthur <mumrah@gmail.com>
2024-12-17 12:46:21 -05:00
Yaroslav Kutsela 337fb8cec1
MINOR, DOCS : Fixed old and added new javadocs to org.apache.kafka.common.utils.Utils (#18162)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2024-12-17 08:16:00 +00:00
Sean Quah 18f17ed4d3
KAFKA-18200; Handle empty batches in coordinator runtime (#18144)
* Avoid attaching empty writes to empty batches.
* Handle flushes of empty batches, which would return a 0 offset otherwise.

Reviewers: David Jacot <djacot@confluent.io>
2024-12-16 23:39:48 -08:00
Ismael Juma cd5a7ee6b2
KAFKA-18270: SaslHandshake v0 incorrectly tagged as deprecated (#18221)
It's now consistent with KIP-896.

Reviewers: David Arthur <mumrah@gmail.com>
2024-12-16 20:52:30 -08:00
Matthias J. Sax 16f1aa84df
MINOR: improve Kafka Streams config docs (#18087)
Reviewers: Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2024-12-16 15:21:52 -08:00
Matthias J. Sax 85c43e49e3
MINOR: improving some internal comments (#18152)
Reviewers: Yaroslav Kutsela (@Serwios), Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2024-12-16 15:21:03 -08:00
David Jacot 86f7fdecf3
MINOR: Add 4.0 branch to CI (#18215)
Reviewers: David Arthur <mumrah@gmail.com>
2024-12-16 13:13:18 -05:00
TengYao Chi 8c55dcc979
KAFKA-18237: Upgrade system tests from using 3.7.1 to 3.7.2 (#18180)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2024-12-16 09:49:03 -08:00
David Jacot a12152f028
KAFKA-18263; Group lock must be acquired when reverting static membership rejoin (#18207)
When a static member rejoins the group, the group state is rewritten to the partition in order to persist the change. If the write fails, the change is reverted. However, this is done without acquiring the group lock.

This is only try in the old group coordinator. The new one does not suffer from this issue.

Reviewers: Jeff Kim <jeff.kim@confluent.io>
2024-12-16 18:20:35 +01:00
TengYao Chi 4aee33d6ab
KAFKA-18259: Documentation for consumer auto.offset.reset contains invalid HTML (#18210)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2024-12-16 16:20:30 +00:00
Nick Guo 2582d36291
KAFKA-18244: Fix empty SHA on "Pull Request Labeled" workflow (#18190)
Reviewers: David Arthur <mumrah@gmail.com>
2024-12-16 11:14:37 -05:00
David Jacot 84049369c1
MINOR: Bump trunk to 4.1.0-SNAPSHOT (#18213)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-12-16 16:47:13 +01:00
Ken Huang 92f61b36f4
KAFKA-18226: Disable CustomQuotaCallbackTest and remove isKRaftTest (#18166)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-12-16 16:46:39 +01:00
Jhen-Yung Hsu 9cc1547672
KAFKA-18247 Use log4j2 yaml to rewrite the fix of KAFKA-18145 (#18192)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-16 20:53:12 +08:00
Peter Lee 220c578521
KAFKA-18014: Add duration based offset reset option for ShareConsumer (#18096)
Kafka consumer supports auto.offset.reset config option, which is used when there is no initial offset in Kafka (or) if the current offset does not exist any more on the server. This config currently supports earliest/latest/none options. Currently consumer resets might force applications to reprocess large amounts of data from earlier offsets. With infinite storage, its beneficial to have a duration based offset reset strategy. This will allow applications to consume/initialise from a fixed duration when there is no initial offset in Kafka.

As part of KIP-932, we are adding support for share consumer groups. Share consumer groups supports dynamic group configuration property share.auto.offset.reset. This is used to set the initial Share-Partition Start Offset (SPSO) based on the share.auto.offset.reset configuration. Currently share.auto.offset.reset supports earliest and latest options to automatically reset the offset

Similar to the Kafka Consumer, we will add support for by_duration: config value for share.auto.offset.reset.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Apoorv Mittal <apoorvmittal10@gmail.com>
2024-12-16 08:25:37 +00:00
TengYao Chi ca7b1dcb00
MINOR: Add an example of how to run multiple test file to tests/README (#18181)
Reviewers: TaiJuWu <tjwu1217@gmail.com>, Yung <yungyung7654321@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-16 13:52:14 +08:00
David Arthur 9b5588151b
MINOR: Only look for the CI workflow pending approval (#18200)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-16 13:49:58 +08:00
A. Sophie Blee-Goldman bac8928521
KAFKA-18026: KIP-1112, migrate foreign-key joins to use ProcesserSupplier#stores (#18194)
Convert FKJ processors to implementing the #stores method

Reviewers: Guozhang Wang <guozhang.wang.us@gmail.com>
2024-12-15 20:00:42 -08:00
TengYao Chi 408ce19c62
KAFKA-18245 add Flaky annotation to testMetricsDuringTopicCreateDelete (#18187)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-15 15:48:11 +08:00
TengYao Chi 0781b1bad3
KAFKA-15474 Disable flaky testWakeupAfterSyncGroupReceivedExternalCompletion (#18188)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-15 15:41:51 +08:00
ClarkChen a2a098de6a
KAFKA-18246 Fix ConnectRestApiTest.test_rest_api by adding multiversioning configs (#18191)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-15 15:39:43 +08:00
Rohan ed10fc63a9
KAFKA-18026: supply stores for KTable#mapValues using ProcessorSupplier#stores (#18155)
KAFKA-18026: supply stores for KTable#mapValues using ProcessorSupplier#stores

Reviewers: Guozhang Wang <guozhang.wang.us@gmail.com>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2024-12-14 20:18:49 -08:00
Kuan-Po Tseng 0815d70592
KAFKA-18160 Interrupting or waking up onPartitionsAssigned in AsyncConsumer can cause the ConsumerRebalanceListenerCallbackCompletedEvent to be skipped (#18089)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-15 10:47:30 +08:00
Kuan-Po Tseng fef625cfa2
KAFKA-18234 DumpLogSegments cannot print ConsumerGroupRegularExpression record (#18173)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-15 06:02:02 +08:00
Nick Guo 2966856049
KAFKA-18240 Remove nonexistent `LOG4J_CONFIG` from transactional_message_copier.py (#18184)
Reviewers: Ken Huang <s7133700@gmail.com>, TengYao Chi <kitingiao@gmail.com>, TaiJuWu <tjwu1217@gmail.com>, Yung <yungyung7654321@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-15 05:54:14 +08:00
David Arthur 8c1a2ff6e0
MINOR: fix links for badges (#18186)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-15 04:51:07 +08:00
Ken Huang 5a2b03b200
KAFKA-18235 can't build release tar due to broken genConnectOpenAPIDocs task (#18177)
Reviewers: Christopher L. Shannon <christopher.l.shannon@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-15 04:30:54 +08:00
Mickael Maison 57eb5fd7dc
KAFKA-14587: Move AclCommand to tools (#17880)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 20:05:46 +01:00
TengYao Chi e41373cef6
KAFKA-18242 The java code in core module is NOT configured with suitable release version (#18182)
Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 17:33:32 +08:00
Kamal Chandraprakash 139e5b15a1
KAFKA-17928: Make remote log manager thread-pool configs dynamic (#17859)
- Disallow configuring -1 for copier and expiration thread pools dynamically

Co-authored-by: Peter Lee <peterxcli@gmail.com>

Reviewers: Peter Lee <peterxcli@gmail.com>, Satish Duggana <satishd@apache.org>
2024-12-14 13:14:05 +05:30
A. Sophie Blee-Goldman 91575892d2
HOTFIX: RocksDBMetricsRecorder#init should null check taskId (#18151)
Appears to be a typo in the code, since the error message indicates this check is for taskId being null, but instead we accidentally check the streams metrics twice

Reviewers: Matthias Sax <mjsax@apache.org>, runo Cadonna <cadonna@apache.org>, Lucas Brutschy <lbrutschy@confluent.io>, Bill Bejeck <bbejeck@gmail.com>
2024-12-13 20:36:08 -08:00
Matthias J. Sax f2f19b7ad9
MINOR: update release scripts (#18178)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 12:15:20 +08:00
David Arthur f3f975ea67
MINOR: Add badge for flaky test report (#18179)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 12:14:50 +08:00
David Arthur 369b8b5607
KAFKA-18223 Add GHA to run report [2/n] (#18170)
Run the flaky test report daily at 6am UTC.

Reviewers: Jun Rao <junrao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-13 20:59:04 -05:00
Kuan-Po Tseng 9e60fcc87f
KAFKA-18181 Refactor ShareConsumerTest (#18105)
Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 09:39:44 +08:00
David Jacot 450c10d00c
KAFKA-17507; WriteTxnMarkers API must not return until markers are written and materialized in group coordinator's cache (#18168)
We have observed the below errors in some cluster:

Uncaught exception in scheduled task 'handleTxnCompletion-902667' exception.message:Trying to complete a transactional offset commit for producerId *** and groupId *** even though the offset commit record itself hasn't been appended to the log.

When a transaction is completed, the transaction coordinator sends a WriteTxnMarkers request to all the partitions involved in the transaction to write the markers to them. When the broker receives it, it writes the markers and if markers are written to the __consumer_offsets partitions, it informs the group coordinator that it can materialize the pending transactional offsets in its main cache. The group coordinator does this asynchronously since Apache Kafka 2.0, see this patch.

The above error appends when the asynchronous operation is executed by the scheduler and the operation finds that there are pending transactional offsets that were not written yet. How come?

There is actually an issue is the steps described above. The group coordinator does not wait until the asynchronous operation completes to return to the api layer. Hence the WriteTxnMarkers response may be send back to the transaction coordinator before the async operation is actually completed. Hence it is possible that the next transactional produce to be started also before the operation is completed too. This could explain why the group coordinator has pending transactional offsets that are not written yet.

There is a similar issue when the transaction is aborted. However on this path, we don't have any checks to verify whether all the pending transactional offsets have been written or not so we don't see any errors in our logs. Due to the same race condition, it is possible to actually remove the wrong pending transactional offsets.

PS: The new group coordinator is not impacted by this bug.

Reviewers: Justine Olshan <jolshan@confluent.io>
2024-12-13 13:50:41 -08:00
Alyssa Huang b73e31eb15
KAFKA-17641; Update Vote RPC with PreVote field (#17807)
Introduces v2 of Vote RPC and implements the handling of the new version of the RPC.

Many references to "candidate" in the Vote RPC are changed to the more generic "replica". Replicas sending Vote request with PreVote set to true are not candidate. They are instead prospective candidate that are attempting to become candidate.

Replicas receiving PreVote requests (vote request with PreVote=true) with an epoch equal to their own will _not_ transition to Unattached state. They will only grant the vote if they have not recently fetched from leader and the request's last epoch and offset are up-to-date with theirs.

If a replica receives a PreVote request with an epoch greater than their current epoch, they will transition to Unattached state (setting their epoch to the one from the pre-vote request) and then grant the vote if the request's last epoch and offset are up-to-date with theirs.

To avoid a possible ping-pong scenario. For example, there is 3 node quorum, leader node A disconnects from quorum, node B goes into prospective state first before node C, node B sends pre-vote request to node C still in follower state and receives back that node A is leader, node B transitions to follower while node C transitions to prospective after election timeout. If you repeat this interaction, it is possible for such replicas to transition from Follower to Prospective in perpetuity. This issue is resolved by having follower state nodes grant pre-vote requests only if they have successfully fetched from the leader at least once after becoming a follower.

This change introduces a new suite called KafkaRaftClientPreVoteTest, for additional KRaft protocol tests with respect to pre-vote.

Reviewers: José Armando García Sancio <jsancio@apache.org>
2024-12-13 16:24:30 -05:00
Lianet Magrans 84bc0c26ee
KAFKA-18224: Explicit group protocol setting in streams resetter (#18172)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2024-12-13 14:31:50 -05:00
Logan Zhu 497f500483
KAFKA-18183 replace BytesSerializer with ByteArraySerializer for producer/consumer (#18113)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 01:42:32 +08:00
Ken Huang 6af233e4fc
KAFKA-18203 Add a section for Java version in intellij idea in README (#18134)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 01:37:25 +08:00
Ken Huang 669d8610a2
KAFKA-18228 The MetricsDuringTopicCreationDeletionTest should delete topics to ensure that the metrics are recreated (#18163)
Reviewers: TengYao Chi <kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 01:35:08 +08:00
TaiJuWu 161d1cdf85
KAFKA-18218 fix Trogdor system test (#18156)
Reviewers: Ken Huang <s7133700@gmail.com>, TengYao Chi <kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 01:23:58 +08:00
TengYao Chi b37b89c668
KAFKA-9366 Upgrade log4j to log4j2 (#17373)
This pull request replaces Log4j with Log4j2 across the entire project, including dependencies, configurations, and code. The notable changes are listed below:

1. Introduce Log4j2 Instead of Log4j
2. Change Configuration File Format from Properties to YAML
3. Adds warnings to notify users if they are still using Log4j properties, encouraging them to transition to Log4j2 configurations

Co-authored-by: Lee Dongjin <dongjin@apache.org>

Reviewers: Luke Chen <showuon@gmail.com>, Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-12-14 01:14:31 +08:00
Sean Quah b94defa189
KAFKA-18199; Fix size calculation for nullable tagged structs (#18127)
When a struct field is tagged and nullable, it is serialized as
{ varint tag; varint dataLength; nullable data }, where
nullable is serialized as
{ varint isNotNull; if (isNotNull) struct s; }. The length field
includes the is-not-null varint.

This patch fixes a bug in serialization where the written value of
the length field and the value used to compute the size of the length
field differs by 1. In practice this has no impact unless the
serialized length of the struct is 127 bytes, since the varint encodings
of 127 and 128 have different lengths (0x7f vs 0x80 01).

Reviewers: David Jacot <djacot@confluent.io>
2024-12-13 04:31:53 -08:00
PoAn Yang 770d64d2cc
KAFKA-16143: New JMX metrics for AsyncKafkaConsumer (#17199)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Kirk True <ktrue@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
2024-12-13 07:20:27 -05:00
PoAn Yang d5ad9228cf
KAFKA-17750; Extend kafka-consumer-groups command line tool to support new consumer group (part 3) (#18141)
This patch extends the `kafka-consumer-groups` command line tool to support the new consumer group as described in KIP-1099.

Signed-off-by: PoAn Yang <payang@apache.org>

Reviewers: David Jacot <djacot@confluent.io>
2024-12-13 01:31:39 -08:00
Gantigmaa Selenge 747dc172e8
KIP-1073: Return fenced brokers in DescribeCluster response (#17524)
mplementation of KIP-1073: Return fenced brokers in DescribeCluster response.
Add new unit and integration tests for describeCluster.

Reviewers: Luke Chen <showuon@gmail.com>
2024-12-13 10:58:11 +08:00
Matthias J. Sax d7c80a7257 MINOR: update Kafka version for docker scan 2024-12-12 16:30:24 -08:00