Commit Graph

11457 Commits

Author SHA1 Message Date
Divij Vaidya 353141ed92
KAFKA-15251: Add 3.5.1 to system tests (#14069)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2023-07-27 12:33:34 +02:00
Jeff Kim d2fc907623
KAFKA-14500; [6/6] Implement SyncGroup protocol in new GroupCoordinator (#14017)
This patch implements the SyncGroup API in the new group coordinator. All the new unit tests are based on the existing scala tests.

Reviewers: David Jacot <djacot@confluent.io>
2023-07-27 08:02:29 +02:00
Hao Li ed44bcd71b
KAFKA-15022: [3/N] use graph to compute rack aware assignment for active stateful tasks (#14030)
Part of KIP-925.

Reviewers: Matthias J. Sax <matthias@confluent.io>
2023-07-26 16:02:52 -07:00
Said Boudjelda 8135b6dfd8
KAFKA-15235: Fix broken coverage reports since migration to Gradle 8.x (#14075)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-26 19:52:02 +02:00
Said Boudjelda e5fb9b61fb
MINOR: upgrade version of gradle plugin (ben-manes.versions) to 0.47.0 (#14098)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-26 19:12:27 +02:00
David Arthur a900794ace
KAFKA-15196 Additional ZK migration metrics (#14028)
This patch adds several metrics defined in KIP-866:

* MigratingZkBrokerCount: the number of zk brokers registered with KRaft
* ZkWriteDeltaTimeMs: time spent writing MetadataDelta to ZK
* ZkWriteSnapshotTimeMs: time spent writing MetadataImage to ZK
* Adds value 4 for "ZK" to ZkMigrationState

Also fixes a typo in the metric name introduced in #14009 (ZKWriteBehindLag -> ZkWriteBehindLag)

Reviewers: Luke Chen <showuon@gmail.com>, Colin P. McCabe <cmccabe@apache.org>
2023-07-26 12:54:59 -04:00
sciclon2 6d81698ba4
KAFKA-15243: Set decoded user names to DescribeUserScramCredentialsResponse (#14094)
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2023-07-26 19:18:09 +05:30
vamossagar12 ff390ab60a
[MINOR] Fix Javadoc comment in KafkaFuture#toCompletionStage (#14100)
Fix Javadoc comment in KafkaFuture#toCompletionStage

Reviewers: Luke Chen <showuon@gmail.com>
2023-07-26 20:26:20 +08:00
Federico Valeri bb677c4959
KAFKA-14583: Move ReplicaVerificationTool to tools (#14059)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-07-26 12:04:34 +02:00
Said Boudjelda 4d30cbf3cd
MINOR: Upgrade the minor version of snappy dependency to 1.1.10.3 (#14072)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-26 11:21:36 +02:00
Divij Vaidya 206a4af0d1
MINOR: Add co-authors to release email template (#14080)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-07-26 11:19:56 +02:00
vamossagar12 46a8a2877b
KAFKA-15218: Avoid NPE thrown while deleting topic and fetch from follower concurrently (#14051)
When deleting topics, we'll first clear all the remoteReplicaMap when stopPartitions here. But this time, there might be fetch request coming from follower, and try to check if the replica is eligible to be added into ISR here. At this moment, NPE will be thrown. Although it's fine since this topic is already deleted, it'd be better to avoid it happen.

Reviewers: Luke Chen <showuon@gmail.com>
2023-07-26 09:51:23 +08:00
Matthias J. Sax af1f50fc9e
MINOR: fix docs markup (#14085)
Reviewers: Qichao Chu (@ex172000), Mickael Maison <mickael.maison@gmail.com>
2023-07-25 14:56:58 -07:00
David Arthur e794bc719a
MINOR: Add a Builder for KRaftMigrationDriver (#14062)
Reviewers: Justine Olshan <jolshan@confluent.io>
2023-07-25 16:05:04 -04:00
tison 8b027b6fef
MINOR: Fix typo in ProduceRequest.json (#14070)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-07-25 17:56:49 +02:00
Yash Mayya 08b3820d5e
KAFKA-15238: Move DLQ reporter setup from the DistributedHerder's tick thread to the sink task thread (#14079)
Reviewers: Chris Egerton <chrise@aiven.io>
2023-07-25 09:03:29 -04:00
Chris Egerton 58b8c5c7b1
MINOR: Downgrade log level for conflicting Connect plugin aliases (#14081)
Reviewers: Greg Harris <greg.harris@aiven.io>
2023-07-25 08:12:46 -04:00
Colin Patrick McCabe c7de30f38b
KAFKA-15183: Add more controller, loader, snapshot emitter metrics (#14010)
Implement some of the metrics from KIP-938: Add more metrics for
measuring KRaft performance.

Add these metrics to QuorumControllerMetrics:
    kafka.controller:type=KafkaController,name=TimedOutBrokerHeartbeatCount
    kafka.controller:type=KafkaController,name=EventQueueOperationsStartedCount
    kafka.controller:type=KafkaController,name=EventQueueOperationsTimedOutCount
    kafka.controller:type=KafkaController,name=NewActiveControllersCount

Create LoaderMetrics with these new metrics:
    kafka.server:type=MetadataLoader,name=CurrentMetadataVersion
    kafka.server:type=MetadataLoader,name=HandleLoadSnapshotCount

Create SnapshotEmitterMetrics with these new metrics:
    kafka.server:type=SnapshotEmitter,name=LatestSnapshotGeneratedBytes
    kafka.server:type=SnapshotEmitter,name=LatestSnapshotGeneratedAgeMs

Reviewers: Ron Dagostino <rndgstn@gmail.com>
2023-07-24 21:13:58 -07:00
David Mao 79b8c969e5
KAFKA-14990: Dynamic producer ID expiration should be applied on a broker restart (#13707)
Dynamic overrides for the producer ID expiration config are not picked up on broker restart in Zookeeper mode. Based on the integration test, this does not apply to KRaft mode.

Adds a broker restart that fails without the corresponding KafkaConfig change.

Reviewers: Justine Olshan <jolshan@confluent.io>
2023-07-24 13:22:25 -07:00
Justine Olshan 38781f9aea
KAFKA-14920: Address timeouts and out of order sequences (#14033)
When creating a verification state entry, we also store sequence and epoch. On subsequent requests, we will take the latest epoch seen and the earliest sequence seen. That way, if we try to append a sequence after the earliest seen sequence, we can block that and retry. This addresses potential OutOfOrderSequence loops caused by errors during verification (coordinator loading, timeouts, etc).

Reviewers:  David Jacot <david.jacot@gmail.com>,  Artem Livshits <alivshits@confluent.io>
2023-07-24 13:08:57 -07:00
Kamal Chandraprakash 84691b11f6
KAFKA-15168: Handle overlapping remote log segments in RemoteLogMetadata cache (#14004)
KAFKA-15168: Handle overlapping remote log segments in RemoteLogMetadata cache

Reviewers: Satish Duggana <satishd@apache.org>, Viktor Nikitash <nikitashvictor@pdffiller.com>, Jorge Esteban Quilcate Otoya <quilcate.jorge@gmail.com>, Abhijeet Kumar <abhijeet.cse.kgp@gmail.com>
2023-07-24 19:36:25 +05:30
Owen Leung 4981fa939d
KAFKA-14712: Produce correct error msg with correct metadataversion (#13773)
Fix the confusing error message in ImageWriterOptions

Reviewers: Luke Chen <showuon@gmail.com>, David Arthur <mumrah@gmail.com>
2023-07-24 10:37:23 +08:00
Owen Leung a3204aed2e
KAFKA-15194: Prepend offset in the filenames used by LocalTieredStorage (#14057)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-22 13:47:26 +02:00
Jorge Esteban Quilcate Otoya cc4e699d4c
MINOR: Minor logging and doc related improvements in topic-based RLMM consumer-manager/task (#14045)
Improved logging and docs on consumer manager/task call paths.

Reviewers: Luke Chen <showuon@gmail.com>, Satish Duggana <satishd@apache.org>
2023-07-22 10:03:35 +05:30
Philip Nee 1656591d0b
KAFKA-14950: implement assign() and assignment() (#13797)
We will explicitly send an assignment change event to the background thread to invoke auto-commit if the group.id is configured. After updating the subscription state, a NewTopicsMetadataUpdateRequestEvent will also be sent to the background thread to update the metadata.

Co-authored-by: Kirk True <kirk@kirktrue.pro>
Reviewers: Jun Rao <junrao@gmail.com>
2023-07-21 13:59:00 -07:00
Federico Valeri 1bf73d89d0
KAFKA-15232: Move ToolsUtils to tools (#14066)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-07-21 20:27:44 +02:00
David Jacot 2528dd4116
KAFKA-14499: [2/N] Add OffsetCommit record & related (#14047)
This patch does a few things:
1) It introduces the `OffsetAndMetadata` class which hold the committed offsets in the group coordinator.
2) It adds methods to deal with OffsetCommit records to `RecordHelpers`.
3) It adds `MetadataVersion#offsetCommitValueVersion` to get the version of the OffsetCommit value record that should be used.

Reviewers: Jeff Kim <jeff.kim@confluent.io>, David Arthur <mumrah@gmail.com>, Justine Olshan <jolshan@confluent.io>
2023-07-21 20:09:06 +02:00
David Jacot 69659b70fc
KAFKA-14499: [1/N] Introduce OffsetCommit API version 9 and add new StaleMemberEpochException error (#14046)
This patch does a few things:
1) It introduces version 9 of the OffsetCommit API. This new version has no schema changes but it can return a StaleMemberEpochException if the new consumer group protocol is used. Note the use of `"latestVersionUnstable": true` in the request schema. This means that this new version is not available yet unless activated.
2) It renames the `generationId` field in the request to `GenerationIdOrMemberEpoch`. This is backward compatible change.
3) It introduces the new StaleMemberEpochException error.
4) It does a minor refactoring in OffsetCommitRequest class.

Reviewers: Jeff Kim <jeff.kim@confluent.io>, David Arthur <mumrah@gmail.com>, Justine Olshan <jolshan@confluent.io>
2023-07-21 20:08:06 +02:00
Yash Mayya 4daeb2714c
KAFKA-13431 (KIP-793): Expose the original pre-transform topic partition and offset in sink records (#14024)
Reviewers: Greg Harris <greg.harris@aiven.io>, Chris Egerton <chrise@aiven.io>
2023-07-21 12:06:01 -04:00
Nikolay 4bba2c8a32
KAFKA-14591: Move DeleteRecordsCommand to tools (#13278)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Federico Valeri <fedevaleri@gmail.com>
2023-07-21 17:30:28 +02:00
Said Boudjelda 2e30dd894f
MINOR: add JDK 20 build support to README (#14061)
Adding the value 20 to the JDK version that can build Apache Kafka into README.md

Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-21 10:45:01 +02:00
Said Boudjelda e9fc742979
KAFKA-15222: upgrade zinc scala plugin to 1.9.2 (#14060)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-21 10:42:47 +02:00
Satish Duggana 4ea9394e7e
MINOR Fix the build failure (#14065)
Fixing the build failure caused by the earlier commit 27ea025e33 


```
[Error] /Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:3526:77: the result type of an implicit conversion must be more specific than Object
[Error] /Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/server/ReplicaManagerTest.scala:3530:70: the result type of an implicit conversion must be more specific than Object
[Warn] /Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/server/ServerGenerateBrokerIdTest.scala:23:21: imported `QuorumTestHarness` is permanently hidden by definition of object QuorumTestHarness in package server
[Warn] /Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/server/ServerGenerateClusterIdTest.scala:29:21: imported `QuorumTestHarness` is permanently hidden by definition of object QuorumTestHarness in package server
[Error] /Users/satishd/repos/apache-kafka/core/src/test/scala/unit/kafka/utils/TestUtils.scala:1438:15: ambiguous reference to overloaded definition,
both method doReturn in class Mockito of type (x$1: Any, x$2: Object*)org.mockito.stubbing.Stubber
and  method doReturn in class Mockito of type (x$1: Any)org.mockito.stubbing.Stubber
match argument types (kafka.log.UnifiedLog)
```

Reviewers: Luke Chen <showuon@gmail.com>
2023-07-21 13:56:02 +05:30
Luke Chen 27ea025e33
KAFKA-15176: add tests for tiered storage metrics (#13999)
Added tests for metrics:
1. RemoteLogReaderTaskQueueSize
2. RemoteLogReaderAvgIdlePercent
3. RemoteLogManagerTasksAvgIdlePercent

Also, added tests for OffsetOutOfRangeException will be thrown while reading logs

Reviewers: Christo Lolov <christololov@gmail.com>, Satish Duggana <satishd@apache.org>
2023-07-21 10:30:33 +08:00
Hao Li 6bb88ae2f7
KAFKA-15022: [2/N] introduce graph to compute min cost (#13996)
Part of KIP-925.

Reviewers: Matthias J. Sax <matthias@confluent.io>
2023-07-20 16:17:47 -07:00
Greg Harris 125dbb9286
KAFKA-14760: Move ThroughputThrottler from tools to clients, remove tools dependency from connect-runtime (#13313)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-07-20 12:58:48 -07:00
Christo Lolov 8f313eaed4
KAFKA-14133: Migrate various mocks in TaskManagerTest to Mockito (#13874)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-20 18:16:18 +02:00
Chris Egerton 01a16ca301
KAFKA-14469: Add MirrorMaker configs to table of contents in docs page (#14041)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-07-20 10:25:34 -04:00
Yash Mayya ea6e100ec3
KAFKA-15216: InternalSinkRecord::newRecord should not ignore new headers (#14044)
Reviewers: Chris Egerton <chrise@aiven.io>
2023-07-20 10:22:35 -04:00
Walker Carlson e9fe2a2eea
KAFKA-14936: Check the versioned table's history retention and compare to grace period (4/N) (#13942)
Check the history retention of the ktable of the grace period join.

Reviewers: Reviewers: Victoria Xia <victoria.xia@confluent.io>, Bruno Cadonna <cadonna@apache.org>
2023-07-20 16:01:21 +02:00
Federico Valeri 334c41d604
KAFKA-14734: Use CommandDefaultOptions in StreamsResetter (#13983)
This PR adds CommandDefaultOptions usage like in the other joptsimple based tools. It also moves the associated unit test class from streams to tools module as discussed in #13127 (comment)

Reviewers:  Luke Chen <showuon@gmail.com>, Bruno Cadonna <cadonna@apache.org>, Sagar Rao <sagarmeansocean@gmail.com>
2023-07-20 18:45:05 +08:00
Tanay Karmarkar 583f708006
MINOR: Delete unneeded classgraph-MIT license (#14040)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-20 11:23:39 +02:00
Greg Harris f6e7aa3763
KAFKA-15150: Add ServiceLoaderScanner implementation (#13971)
Reviewers: Chris Egerton <chris.egerton@aiven.io>
2023-07-19 16:21:58 -07:00
Greg Harris 844469311a
KAFKA-10579: Upgrade reflections from 0.9.12 to 0.10.2 (#14029)
Reviewers: Divij Vaidya <diviv@amazon.com>, Chris Egerton <chris.egerton@aiven.io>
2023-07-19 14:00:15 -07:00
Greg Harris d5a00cca74
KAFKA-15162: Reflectively find plugins in parent ClassLoaders that aren't on the classpath (#13977)
Signed-off-by: Greg Harris <greg.harris@aiven.io>
Reviewed-by: Chris Egerton <chris.egerton@aiven.io>
2023-07-19 12:49:25 -07:00
gaurav-narula 29f36d733b
KAFKA-15141: Initialize logger statically on hot codepaths (#13949)
Log4j based loggers use `org.apache.logging.log4j.spi.AbstractLoggerAdapter::getContext`
which invokes StackLocatorUtil to walk the stacktrace. This operation is quite CPU intensive
and is performed each time during instantiation.

To avoid walking the stack often, this change uses a static variable to initialize the logger
for a few classes which seem to be instantiated frequently.

Reviewers: Divij Vaidya <diviv@amazon.com>, Ismael Juma <ismael@juma.me.uk>
2023-07-19 12:24:40 -07:00
Yash Mayya a68281bf3c
MINOR: Fix Connect compatibility javadocs to use NoSuchMethodError instead of NoSuchMethodException (#14036)
Reviewed-by: Greg Harris <greg.harris@aiven.io>
2023-07-19 10:23:02 -07:00
Greg Harris 1f7f6ceebf
KAFKA-15211: Mock InvalidParameterException in DistributedConfigTest (#14039)
Signed-off-by: Greg Harris <greg.harris@aiven.io>
Reviewed-by: Chris Egerton <chris.egerton@aiven.io>
2023-07-19 09:02:44 -07:00
Said Boudjelda 2999168cde
MINOR: Upgrade Gradle wrapper version to 8.2.1 (#14032)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-19 09:39:29 +02:00
Tanay Karmarkar f66a0f0bab
KAFKA-15199: Remove Leading and Trailing Spaces in release.py (#14035)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-07-19 09:35:05 +02:00