Commit Graph

15093 Commits

Author SHA1 Message Date
Almog Gavra 95abd174c7
MINOR: fix typo in HTML docs (#18742)
Reviewers: Divij Vaidya <diviv@amazon.com>
2025-01-30 11:58:13 +01:00
Mehari Beyene cc259d76e9
KAFKA-18570: Update documentation to add remainingLogsToRecover, remainingSegmentsToRecover and LogDirectoryOffline metrics (#18731)
Reviewers: Divij Vaidya <diviv@amazon.com>
2025-01-30 11:52:35 +01:00
Lucas Brutschy 56e50120be
KAFKA-18621: Add StreamsCoordinatorRecordHelpers (#18669)
A class with helper methods to create records stored in the __consumer_offsets topic.

Compared to the feature branch, I added unit tests (most functions were not tested) and adopted the new interface for constructing coordinator records introduced by David.

Reviewers: Bruno Cadonna <cadonna@apache.org>
2025-01-30 09:28:45 +01:00
PoAn Yang 0dfc4017b8
KAFKA-18441: Fix flaky KafkaAdminClientTest#testAdminClientApisAuthenticationFailure (#18735)
Reviewers: Lianet Magrans <lmagrans@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>, Andrew Schofield <aschofield@confluent.io>
2025-01-30 08:01:20 +00:00
David Arthur 617196c68e
KAFKA-18636 Fix how we handle Gradle exits in CI (#18681)
This patch removes the explicit failure of test tasks in Gradle when there is a flaky test. This also fixes a fall-through case in junit.py where we did not recognize an error prior to running the tests (such as the javadoc task).

Additionally, this patch removes usages of ignoreFailures in our CI and changes the XML copy task to a finalizer task instead of doLast closure.

Reviewers: Jun Rao <junrao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-29 18:42:39 -05:00
Calvin Liu fdbed6c458
KAFKA-18649: complete ClearElrRecord handling (#18708)
Implement ClearElrRecord handling in the TopicDelta. Also, the ReplicationControlManager should not merge updates if ELR/LastKnownElr are empty, becuase that will cause an unnecessary partition epoch bump.

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2025-01-29 15:07:44 -08:00
TengYao Chi 9dd73d43b0
KAFKA-18569: New consumer close may wait on unneeded FindCoordinator (#18590)
Reviewers: Lianet Magrans <lmagrans@confluent.io>, Kirk True <ktrue@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-29 14:15:56 -05:00
Matthias J. Sax 1123a76110
KAFKA-13722: remove internal usage of old ProcessorContext (#18698)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2025-01-29 11:13:57 -08:00
Bill Bejeck 20b073bbee
KAFKA-18498: Update lock ownership from main thread (#18732)
Once a StreamThread receives its assignment, it will close the startup tasks. But during the closing process, the StandbyTask.closeClean() method will eventually call theStatemanagerUtil.closeStateManager method which needs to lock the state directory, but locking requires the calling thread be the current owner. Since the main thread grabs the lock on startup but moves on without releasing it, we need to update ownership explicitly here in order for the stream thread to close the startup task and begin processing.

Reviewers: Matthias Sax <mjsax@apache.org>, Nick Telford
2025-01-29 14:09:44 -05:00
Joao Pedro Fonseca Dantas 85109a5111
KAFKA-16339: Add Kafka Streams migrating guide from transform to process (#18314)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2025-01-29 11:07:16 -08:00
PoAn Yang 4dd0bcbde8
KAFKA-18383 Remove reserved.broker.max.id and broker.id.generation.enable (#18478)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-01-30 02:55:09 +08:00
Calvin Liu a3b34c1315
KAFKA-18662: Return CONCURRENT_TRANSACTIONS on produce request in TV2 (#18733)
While testing, it was found that the not_enough_replicas error was super common and could be easily confused. Since we are already bumping the request, we can signify that the produce request may return this error and new clients can handle it 

(Note, the java client should be able to handle this already as a retriable error, but other client libraries may need to implement this change)

Reviewers: Justine Olshan <jolshan@confluent.io>
2025-01-29 10:15:48 -08:00
Sushant Mahajan 632aedcf4f
KAFKA-18632: Multibroker test improvements. (#18718)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-01-29 17:03:43 +00:00
Jeff Kim 048dfeffd0
MINOR: prevent exception from HdrHistogram (#18674)
HdrHistogram can throw an exception if the recorded value is greater than a configured limit. Expand the ceiling from per-metric to all invocations.

Reviewers: David Jacot <djacot@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-29 11:34:46 -05:00
Abhinav Dixit dd1f2b8aab
KAFKA-18653: Fix mocks and potential thread leak issues causing silent RejectedExecutionException in share group broker tests (#18725)
Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Andrew Schofield <aschofield@confluent.io>
2025-01-29 16:24:30 +00:00
Ismael Juma ca5d2cf76d
KAFKA-18646: Null records in fetch response breaks librdkafka (#18726)
Ensure we always return empty records (including cases where an error is returned).
We also remove `nullable` from `records` since it is effectively expected to be
non-null by a large percentage of clients in the wild.

This behavior regressed in fe56fc9 (KAFKA-18269). Empty records were
previously set via `FetchResponse.recordsOrFail(partitionData)` in the
now-removed `maybeConvertFetchedData` method.

Added an integration test that fails without this fix and also update many
tests to set `records` to `empty` instead of leaving them as `null`.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, David Arthur <mumrah@gmail.com>
2025-01-29 07:04:12 -08:00
TengYao Chi 97a228070e
KAFKA-18619: New consumer topic metadata events should set requireMetadata flag (#18668)
Reviewers: Lianet Magrans <lmagrans@confluent.io>
2025-01-29 08:36:05 -05:00
Andrew Schofield f960e20647
KAFKA-18488: Improve KafkaShareConsumerTest (#18728)
Reviewers: Lianet Magrans <lmagrans@confluent.io>
2025-01-29 09:47:21 +00:00
Ismael Juma e6d72c9e60
KAFKA-18648: Add back support for metadata version 0-3 (#18716)
During testing, we identified that kafka-python (and aiokafka) relies on metadata request v0 and
hence we need to add these back to comply with the premise of KIP-896 - i.e. it should not
break the clients listed within it.

I reverted the changes from #18218 related to the removal of metadata versions 0-3.

I will submit a separate PR to undeprecate these API versions on the relevant 3.x branches.

kafka-python (and aiokafka) work correctly (produce & consume) with this change on
top of the 4.0 branch.

Reviewers: David Arthur <mumrah@gmail.com>
2025-01-28 18:35:33 -08:00
David Arthur f18457f2b8
MINOR Mark a StickyAssignorTest as flaky (#18719)
Mark StickyAssignorTest#testLargeAssignmentAndGroupWithNonEqualSubscription as flaky. Used data from this
report https://github.com/apache/kafka/actions/runs/12982945953

Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-01-28 10:34:05 -05:00
Apoorv Mittal c7619ef8d1
KAFKA-17951: Share parition rotate strategy (#18651)
Reviewers: Andrew Schofield <aschofield@confluent.io>, Abhinav Dixit <adixit@confluent.io>
2025-01-28 11:44:48 +00:00
Sushant Mahajan f32932cc25
KAFKA-18629: Delete share group state impl [1/N] (#18712)
Reviewers: Christo Lolov <lolovc@amazon.com>, Andrew Schofield <aschofield@confluent.io>
2025-01-28 11:43:01 +00:00
Ken Huang 5631be20a6
MINOR: Remove ZooKeeper mentions in comments (#18646)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2025-01-28 12:35:46 +01:00
Apoorv Mittal 04567cdb22
KAFKA-18657: Fixing SharePartitionManager flaky test (#18710)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Andrew Schofield <aschofield@confluent.io>
2025-01-28 08:06:58 +00:00
Matthias J. Sax dc396f47e8
KAFKA-17162: join() started thread in DefaultTaskManagerTest (#18570)
Reviewers: Lucas Brutschy <lbrutschy@confluent.io>
2025-01-27 16:48:07 -08:00
TaiJuWu e89b30d14e
KAFKA-18528: MultipleListenersWithSameSecurityProtocolBaseTest and GssapiAuthenticationTest should run for async consumer (#18555)
Reviewers: Kirk True <ktrue@confluent.io>, Lianet Magrans <lmagrans@confluent.io>
2025-01-27 15:49:44 -05:00
Matthias J. Sax ee4f8f8c42
KAFKA-18541: fix flaky KafkaStreamsTelemetryIntegrationTest (#18569)
Reviewers: Bill Bejeck <bill@confluent.io>
2025-01-27 09:43:25 -08:00
Martin Sillence d001b47093
KAFKA-17792: Efficiently parse decimals with large exponents in Connect Values (#17510)
Reviewers: Greg Harris <greg.harris@aiven.io>, Mickael Maison <mickael.maison@gmail.com>
2025-01-27 09:04:29 -08:00
Sushant Mahajan b92cd9d236
KAFKA-18632: Added few share consumer multibroker tests. (#18679)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-01-27 12:56:56 +00:00
Chung, Ming-Yen a8f6fc9cc4
KAFKA-18631 Remove ZkConfigs (#18693)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-01-26 04:37:49 +08:00
TengYao Chi 9bab9dc023
MINOR: Remove EMPTY_NODE_ID (#18707)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-01-26 04:28:01 +08:00
Chirag Wadhwa c09d2c940f
KAFKA-18642: Increased the timeouts in share_consumer_test.py system tests (#18699)
Reviewers: Andrew Schofield <aschofield@confluent.io>
2025-01-25 19:23:40 +00:00
PoAn Yang be7415cb8b
KAFKA-18555 Avoid casting MetadataCache to KRaftMetadataCache (#18632)
Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-25 23:02:28 +08:00
PoAn Yang c774352c35
MINOR: add removed controller metrics to zk2kraft (#18654)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-01-25 22:54:27 +08:00
Ken Huang c40e7a1341
KAFKA-18533 Remove KafkaConfig zookeeper related logic (#18547)
Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-25 22:52:21 +08:00
Chung, Ming-Yen 43af241b50
KAFKA-18639 Enable the @Flaky annotation for some flaky tests (#18701)
The following tests were previously reported as flaky but were only annotated with a comment in pull request #18558 due to module dependency limitations:

    testAdminClientApisAuthenticationFailure
    testOutdatedCoordinatorAssignment
    testThrottledProducerConsumer

With the introduction of the new test infrastructure #18602 , which allows all modules to use the @Flaky annotation, these tests should now be updated to include the @Flaky annotation.

Reviewers: TengYao Chi <kitingiao@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-25 22:44:35 +08:00
mingdaoy c23d4a0d73
KAFKA-18499 Clean up zookeeper from LogConfig (#18583)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-01-25 22:31:46 +08:00
TaiJuWu 023f9c26e6
KAFKA-18529: ConsumerRebootstrapTest should run for async consumer (#18554)
Reviewers: Kirk True <ktrue@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>, Lianet Magrans <lmagrans@confluent.io>
2025-01-24 20:33:20 +01:00
Calvin Liu 6235a73622
KAFKA-16540: Clear ELRs when min.insync.replicas is changed. (#18148)
In order to maintain the integrity of replication, we need to clear the ELRs of affected partitions when min.insync.replicas is changed. This could happen at the topic level, or at a global level if the cluster level default is changed.

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2025-01-24 10:57:33 -08:00
Matthias J. Sax f13a22af0b
KAFKA-13722: remove usage of old ProcessorContext (#18292)
We want to deprecate an remove the old ProcessorContext. Thus, we need
to refactor Kafka Streams runtime code, to not make calls into the old
ProcessorContext but only into new code path.

Reviewers: Bill Bejeck <bill@confluent.io>
2025-01-24 10:31:31 -08:00
Apoorv Mittal 70eab7778d
KAFKA-17894: Implemented broker topic metrics for Share Group 1/N (KIP-1103) (#18444)
The PR implements the BrokerTopicMetrics defined in KIP-1103.

The PR also corrected the share-acknowledgement-rate and share-acknowledgement-count metrics defined in KIP-932 as they are moved to BrokerTopicMetrics, necessary changes to KIP-932 broker metrics will be done once we complete KIP-1103.

Reviewers: Andrew Schofield <aschofield@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>, Jun Rao <junrao@gmail.com>
2025-01-24 09:34:54 -08:00
TengYao Chi 2f1bf2f2ab
KAFKA-18630: Clean ReplicaManagerBuilder (#18687)
Reviewers: Christo Lolov <lolovc@amazon.com>
2025-01-24 17:23:48 +00:00
David Arthur 8c0a0e07ce
KAFKA-17587 Refactor test infrastructure (#18602)
This patch reorganizes our test infrastructure into three Gradle modules:

":test-common:test-common-internal-api" is now a minimal dependency which exposes interfaces and annotations only. It has one project dependency on server-common to expose commonly used data classes (MetadataVersion, Feature, etc). Since this pulls in server-common, this module is Java 17+. It cannot be used by ":clients" or other Java 11 modules.

":test-common:test-common-util" includes the auto-quarantined JUnit extension. The @Flaky annotation has been moved here. Since this module has no project dependencies, we can add it to the Java 11 list so that ":clients" and others can utilize the @Flaky annotation

":test-common:test-common-runtime" now includes all of the test infrastructure code (TestKitNodes, etc). This module carries heavy dependencies (core, etc) and so it should not normally be included as a compile-time dependency.

In addition to this reorganization, this patch leverages JUnit SPI service discovery so that modules can utilize the integration test framework without depending on ":core". This will allow us to start moving integration tests out of core and into the appropriate sub-module. This is done by adding ":test-common:test-common-runtime" as a testRuntimeOnly dependency rather than as a testImplementation dependency. A trivial example was added to QuorumControllerTest to illustrate this.

Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-24 09:03:43 -05:00
Ken Huang 0c9df75295
KAFKA-18474: Remove zkBroker listener (#18477)
Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>, PoAn Yang <payang@apache.org>
2025-01-24 05:53:32 -08:00
David Jacot 80d2a8a42d
KAFKA-18616; Refactor DumpLogSegments's MessageParsers (#18688)
All the work that we have done to automate and to simplify the coordinator records allows us to simplify the related MessageParsers in DumpLogSegments. They can all share the same based implementation. This is nice because it ensures that we handle all those records similarly.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-01-24 04:59:30 -08:00
Okada Haruki 17846fe743
KAFKA-16372 Fix producer doc discrepancy with the exception behavior (#15574)
Currently, Producer.send doc is inconsistent with actual exception behavior
      - TimeoutException: This won't be thrown from send on buffer-full or metadata-missing actually. Instead, it will returned as failed future.
       - AuthenticationException/AuthorizationException: These exceptions are also won't be thrown. Returned with failed future actually.
Fixed Callback javadoc and ProducerConfig doc as well.

Reviewers: Luke Chen <showuon@gmail.com>, Andrew Schofield <aschofield@confluent.io>
2025-01-24 20:23:43 +08:00
TengYao Chi 5d81fe20c8
KAFKA-18590 Cleanup DelegationTokenManager (#18618)
Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-24 20:12:03 +08:00
TengYao Chi fa2df3bca7
KAFKA-18559 Cleanup FinalizedFeatures (#18593)
Reviewers: Ismael Juma <ismael@juma.me.uk>, Chia-Ping Tsai <chia7712@gmail.com>
2025-01-24 19:39:01 +08:00
Logan Zhu 356f0d815c
KAFKA-18597 Fix max-buffer-utilization-percent is always 0 (#18627)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-01-24 18:21:34 +08:00
TengYao Chi 66868fc1fa
KAFKA-18620: Remove UnifiedLog#legacyFetchOffsetsBefore (#18686)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2025-01-24 11:11:05 +01:00