Commit Graph

449 Commits

Author SHA1 Message Date
David Jacot af5df59d2b
KAFKA-17593; [1/N] Introduce re2j dependency (#17634)
This patch is the first of a series of patches to introduce support for server side regular expression. It introduces the re2j dependency.

Co-authored-by: Lianet Magrans <lmagrans@confluent.io>

Reviewers: Lianet Magrans <lmagrans@confluent.io>
2024-10-30 08:20:11 -07:00
Mickael Maison 6e88c10ed5
KAFKA-14483 Move LocalLog to storage module (#17587)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-28 20:41:46 +08:00
Ken Huang 6a37d5cceb
KAFKA-17827 cleanup the mockit version (#17536)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-18 21:42:30 +08:00
kartik-3513 267220a7af
KAFKA-17802 Update Bouncy castle from 1.75 to 1.78.1 (#17512)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-18 00:45:46 +08:00
Josep Prat c20c244fd5
KAFKA-17810 upgrade Jetty because of CVE-2024-8184 (#17517)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-17 14:24:11 +08:00
Chia-Chuan Yu 078760a008
KAFKA-17773 Upgrade spotbug to work under java 23 (#17483)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-16 16:48:22 +08:00
TengYao Chi 582bb48e88
KAFKA-17748 Remove scala-java8-compat (#17497)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-15 13:34:21 +08:00
TengYao Chi 9b62c861fa
KAFKA-17739 Clean up build.gradle to adopt the minimum Java version as 11 (#17426)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-10 14:22:38 +08:00
Colin Patrick McCabe 095ab0acba KAFKA-17753: Update protobuf and commons-io dependencies (#17436)
Reviewers: Josep Prat <jlprat@apache.org>
2024-10-09 16:36:56 -07:00
Federico Valeri 3f2cb55a75
KAFKA-14705: Remove redirections and unused tools (#17386)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-10-07 17:24:43 +02:00
TengYao Chi 0e4eebe9c0
KAFKA-12895 Drop support for Scala 2.12 in Kafka 4.0 (#17313)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-10-07 01:34:38 +08:00
Ken Huang 9cb49092f0
KAFKA-17653 Update Scala version to 2.13.15 for support Java 23 (#17314)
Scala compatibility table: https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#scala-compatibility-table

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-09-30 02:08:51 +08:00
Oleg Bonar 42cc3c0ad5
Update zstd-jni lib (#17253)
Reviewers: Josep Prat <josep.prat@aiven.io>
2024-09-24 08:52:47 +02:00
Oleg Bonar 2703b64c4c
MINOR: Update zstd-jni to 1.5.6-5 (#17151)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-09-12 17:47:32 +02:00
Viktor Somogyi-Vass 59d3d7021a
KAFKA-17437 Upgrade commons-validator from 1.7 to 1.9.0 (#17028)
Reviewers: Josep Prat <josep.prat@aiven.io>, Bertalan Kondrat <kb.pcre@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-09-01 13:15:18 +08:00
Jeff Kim ced34e3176
KAFKA-16379; Coordinator event queue, processing, flush, purgatory time histograms (#16949)
This patch introduces a wrapper around [HdrHistogram](https://github.com/HdrHistogram/HdrHistogram) to use for group coordinator histograms, event queue time, event processing time, flush time, and purgatory time.

Reviewers: David Jacot <djacot@confluent.io>
2024-08-23 04:53:22 -07:00
PoAn Yang d0cd3a899a
KAFKA-17180 Upgrade gradle from 8.8 to 8.10 (#16908)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-08-20 06:37:59 +08:00
Steven Xu e24354a21d
KAFKA-15203: Use Classgraph since org.reflections is no longer under maintenance (#16604)
Reviewers: Liam Miller-Cushon <cushon@google.com>, Greg Harris <greg.harris@aiven.io>
2024-08-19 10:46:24 -07:00
Mickael Maison 7c5d339d07
KAFKA-17227: Refactor compression code to only load codecs when used (#16782)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Josep Prat <josep.prat@aiven.io>
2024-08-06 11:01:21 +02:00
Josep Prat a4277c6617
KAFKA-17227: Update zstd-jni lib (#16763)
* KAFKA-17227: Update zstd-jni lib
* Add note in upgrade docs
* Change zstd-jni version in docker native file and add warning in dependencies.gradle file
* Add reference to snappy in upgrade

Reviewers:  Chia-Ping Tsai <chia7712@gmail.com>,  Mickael Maison <mickael.maison@gmail.com>
2024-08-05 09:51:46 +02:00
Josep Prat dcb331c623
MINOR: Add 3.8.0 to system tests (#16714)
Reviewers:  Manikumar Reddy <manikumar.reddy@gmail.com>
2024-07-30 09:19:48 +02:00
Chung, Ming-Yen baedfc7e04
KAFKA-17160 Determine mockitoArtifactName based on mockitoVersion instead of JavaVersion (#16639)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-07-24 19:39:40 +08:00
Andrew Schofield 1e16e16f64
KAFKA-16730: Initial version of share group consumer client code (#16461)
This is the initial version of the share group consumer client code. It implements the complete ShareConsumer interface.

There are unit tests, but not integration tests yet since those would depend upon complete broker code, which is not available at this point.

Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>,  Lianet Magrans <lianetmr@gmail.com>
2024-07-16 16:45:38 +05:30
TingIāu "Ting" Kì 07133cebd2
KAFKA-16806 Explicitly declare JUnit dependencies for all test modules (#16301)
Reviewers: Greg Harris <gharris1727@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-07-06 06:39:11 +08:00
Xiduo You 7d91bc8cf9
KAFKA-17046 Upgrade netty version to 4.1.111.Final (#16469)
Reviewers: Ken Huang <s7133700@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-07-01 19:32:15 +08:00
Igor Soarez 285698e0cf
MINOR: Add 3.7.1 to system tests (#16483)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-07-01 19:25:31 +08:00
Ken Huang 9b4f13efbc
KAFKA-15623 Remove junit 4 from stream module (#16447)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-06-27 15:11:32 +08:00
TingIāu "Ting" Kì 0e346d3103
KAFKA-15623 (4/N) Migrate streams tests (processor) module to JUnit 5 (#16396)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-06-24 13:06:35 +08:00
Murali Basani 4194e3d163
MINOR: Rename log4j variables to reload4j (#16324)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>, Greg Harris <gharris1727@gmail.com>
2024-06-21 10:43:07 +02:00
PoAn Yang 3d5d1504f7
KAFKA-16878 Remove powermock and easymock from code base (#16236)
Reviewers: TaiJuWu <tjwu1217@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-06-09 00:17:43 +08:00
PoAn Yang 9821acaab6
MINOR: Upgrade gradle from 8.7 to 8.8 (#16190)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-06-05 05:09:04 +08:00
Viktor Somogyi-Vass a68a1cce82
MINOR: Upgrade scala-logging to 3.9.5 (#15914)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Andras Katona <katonaan@gmail.com>, Sanskar Jhajharia <jhajharia.sanskar@gmail.com>
2024-06-03 15:48:49 +02:00
Greg Harris 11ad5e8bca
MINOR: Refactor Values class to fix checkstyle, add benchmark, optimize exceptions (#15469)
Signed-off-by: Greg Harris <greg.harris@aiven.io>
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-05-23 13:23:18 -07:00
Mickael Maison 8d117a188d
KAFKA-16825: Update netty/jetty/jackson/zstd dependencies (#16038)
Reviewers: Luke Chen <showuon@gmail.com>
2024-05-23 17:03:24 +02:00
Mickael Maison e4e1116156
MINOR: Move Throttler to storage module (#16023)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-05-22 18:47:31 +02:00
Mickael Maison affe8da54c
KAFKA-7632: Support Compression Levels (KIP-390) (#15516)
Reviewers: Jun Rao <jun@confluent.io>,  Luke Chen <showuon@gmail.com>
Co-authored-by: Lee Dongjin <dongjin@apache.org>
2024-05-21 17:58:49 +02:00
Ken Huang 7fea279ff9
KAFKA-16763 Upgrade to scala 2.12.19 and scala 2.13.14 (#15958)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-05-18 00:36:38 +08:00
John Yu 49e7c795dc
KAFKA-16490 Upgrade gradle from 8.6 to 8.7 (#15716)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-15 16:41:08 +08:00
Manikumar Reddy fd9c7d2932
MINOR: Add 3.6.2 to system tests (#15665)
Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-04-05 19:36:23 +05:30
Andras Katona 2c49a76573
KAFKA-13922: Adjustments for jacoco, coverage reporting (#11982)
Jacoco and scoverage reporting hasn't been working for a while. This commit fixes report generation. After this PR only subproject level reports are generated as Jenkins and Sonar only cares about that.
This PR doesn't change Kafka's Jenkinsfile.

Reviewers: Viktor Somogyi-Vass <viktorsomogyi@gmail.com>
2024-03-14 10:36:46 +01:00
Johnny Hsu bc0c73e944
KAFKA-16322 upgrade jline from 3.22.0 to 3.25.1 (#15464)
An issue in the component "GroovyEngine.execute" of jline-groovy versions through 3.24.1 allows attackers to cause an OOM (OutofMemory) error. Please refer to https://devhub.checkmarx.com/cve-details/CVE-2023-50572 for more details

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2024-03-06 19:39:34 +08:00
Cheng-Kai, Zhang ae047bbe56
KAFKA-16347: Upgrade zookeeper 3.8.3 -> 3.8.4 (#15480)
Reviewers: Luke Chen <showuon@gmail.com>, Chia-Ping Tsai <chia7712@gmail.com>
2024-03-06 16:34:46 +08:00
Said Boudjelda 21a5bbd84c
MINOR: Upgrade jqwik to version 1.8.3 (#14365)
This minor pull request consist of upgrading version of jqwik library to version 1.8.0 that brings some bug fixing and some enhancements, upgrading the version now will make future upgrades easier

For breaking changes:

We are not using ArbitraryConfiguratorBase, so there is no overriding of configure method
We are not using TypeUsage.canBeAssignedTo(TypeUsage)
No breaking is related to @Provide and @ForAll usage no Exception CannotFindArbitraryException is thrown during tests running
No usage of StringArbitrary.repeatChars(0.0)
We are not affected by the removal of method TypeArbitrary.use(Executable)
We are not affected by the removal or methods ActionChainArbitrary.addAction(action)  and ActionChainArbitrary.addAction(weight, action)
For more details check the release notes: https://jqwik.net/release-notes.html#180

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>, Yash Mayya <yash.mayya@gmail.com>
2024-03-04 00:32:28 +08:00
Stanislav Kozlovski 3075a3f144
MINOR: Add 3.7.0 to system tests (#15436)
As per the release instructions, this patch bumps the versions in the associated files here as part of the 3.7 release
2024-02-27 09:58:48 +01:00
Josep Prat 98a658f871
MINOR: Update dependencies (#15404)
* MINOR: Update dependencies

Updates minor versions for our dependencies and build tool

- Jackson from 2.16.0 to 2.16.1
- JUnit from 5.10.0 to 5.10.2
  https://junit.org/junit5/docs/5.10.2/release-notes/ and https://junit.org/junit5/docs/5.10.1/release-notes/
- Mockito from 5.8.0 to 5.10.0 (only if JDK 11 or higher)
  https://github.com/mockito/mockito/releases/tag/v5.10.0 and https://github.com/mockito/mockito/releases/tag/v5.9.0
- Gradle from 8.5 to 8.6 https://docs.gradle.org/8.6/release-notes.html

Reviewers: Divij Vaidya <diviv@amazon.com>


Signed-off-by: Josep Prat <josep.prat@aiven.io>
2024-02-22 12:11:51 +01:00
Said Boudjelda 3c20d4e54a
MINOR: Upgrade maven artifact version to 3.9.6 (#15309)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2024-02-06 12:18:13 +01:00
Mike Lloyd d6199ade7f
KAFKA-16210: Update jose4j to 0.9.4 (#15284)
Co-authored-by: Mike Lloyd <mike.lloyd@teradata.com>

Reviewers: Divij Vaidya <diviv@amazon.com>
2024-01-30 11:17:03 +01:00
Mickael Maison 27122634ab
MINOR: Add 3.5.2 and 3.6.1 to system tests (#14932)
Reviewers: Matthias J. Sax <mjsax@apache.org>
2024-01-12 15:55:10 +01:00
Divij Vaidya 3c6b9e440b
MINOR: Upgrade Zstd-jni to 1.5.5-11 (#14798)
Reviewers: Ismael Juma <ismael@juma.me.uk>, vamossagar12 <sagarmeansocean@gmail.com>
2024-01-02 11:20:51 +01:00
Divij Vaidya a68c7068f0
KAFKA-16062: Upgrade mockito to 5.8.0 (#15089)
Reviewers: Luke Chen <showuon@gmail.com>
2023-12-29 16:48:18 +01:00
Fiore Mario Vitale 314de9f23c
KAFKA-15996: Improve JsonConverter performance (#14992)
Improve JsonConverter performance by using afterBurnModule of Jackson library.

Reviewers: Divij Vaidya <diviv@amazon.com>, Mickael Maison <mickael.maison@gmail.com>
2023-12-24 21:47:12 +01:00
Said Boudjelda 05014badf2
KAFKA-15208: Upgrade Jackson dependencies to version 2.16.0 (#13662)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Divij Vaidya <diviv@amazon.com>
2023-12-19 15:31:24 +01:00
Justine Olshan d9e8d0ddc1
MINOR: Minor update patch versions (#14641)
We were missing the versions for these patch releases. The versions are in versions.py and Dockerfile.

I've also added a step to the release guide to update these files. https://cwiki.apache.org/confluence/display/KAFKA/Release+Process
2023-12-15 13:07:03 -08:00
Andras Katona 270be2dea5
MINOR: Upgrade jetty to 9.4.53.v20231009 (#14877) 2023-12-04 10:54:27 +01:00
Ismael Juma db308a9fe5
MINOR: Upgrade to gradle 8.5 (#14883)
Reviewers: Satish Duggana <satishd@apache.org>
2023-12-01 09:35:45 +05:30
Hao Li bbd75b80ce
KAFKA-15022: Detect negative cycle from one source (#14696)
Introduce a dummy node connected to every other node and run Bellman-ford from the dummy node once instead of from every node in the graph.

Reviewers: Qichao Chu (@ex172000), Matthias J. Sax <matthias@confluent.io>
2023-11-28 00:29:00 -08:00
Kirk True 22f7ffe5e1
KAFKA-15277: Design & implement support for internal Consumer delegates (#14670)
The consumer refactoring project introduced another `Consumer` implementation, creating two different, coexisting implementations of the `Consumer` interface:

* `KafkaConsumer` (AKA "existing", "legacy" consumer)
* `PrototypeAsyncConsumer` (AKA "new", "refactored" consumer)

The goal of this task is to refactor the code via the delegation pattern so that we can keep a top-level `KafkaConsumer` but then delegate to another implementation under the covers. There will be two delegates at first:

* `LegacyKafkaConsumer`
* `AsyncKafkaConsumer`

`LegacyKafkaConsumer` is essentially a renamed `KafkaConsumer`. That implementation handles the existing group protocol. `AsyncKafkaConsumer` is renamed from `PrototypeAsyncConsumer` and will implement the new consumer group protocol from KIP-848. Both of those implementations will live in the `internals` sub-package to discourage their use.

This task is part of the work to implement support for the new KIP-848 consumer group protocol.

Reviewers: Philip Nee <pnee@confluent.io>, Andrew Schofield <aschofield@confluent.io>, David Jacot <djacot@confluent.io>
2023-11-15 05:00:40 -08:00
José Armando García Sancio 35317d8f7b
MINOR; Fix KRaft metadata version system tests (#14722)
The latest metadata version is now 3.7. Fix the KRaft upgrade
test to upgrade to that version instead of 3.6.

Change the vagrant setup and gradle dependencies to use 3.3.2 instead of 3.3.1.

Reviewers: David Arthur <mumrah@gmail.com>
2023-11-09 12:03:12 -08:00
Apoorv Mittal b850b46cf9
KAFKA-15668: Adding Opentelmetry shadowed library (KIP-714) (#14618)
Part of KIP-714.

The PR comprises of changes to include opentlemetry library as defined in KIP-714. The libraries are shadowed to prevent conflicts.

Co-authored-by: Xavier Léauté <xl+github@xvrl.net>

Reviewers: Andrew Schofield <aschofield@confluent.io>, Xavier Léauté <xavier@confluent.io>, Walker Carlson <wcarlson@confluent.io>, Matthias J. Sax <matthias@confluent.io>
2023-11-01 21:53:24 -07:00
atu-sharm a7aaa9c44f
KAFKA-15644: Fix CVE-2023-4586 in netty:handler (#14584)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Luke Chen <showuon@gmail.com>
2023-10-26 18:36:59 +02:00
Chris Egerton 091eb9b349
KAFKA-15428: Cluster-wide dynamic log adjustments for Connect (#14538)
Reviewers: Greg Harris <greg.harris@aiven.io>, Yang Yang <yayang@uber.com>, Yash Mayya <yash.mayya@gmail.com>
2023-10-20 09:52:37 -04:00
Ismael Juma 1073d434ec
KAFKA-14481: Move LogSegment/LogSegments to storage module (#14529)
A few notes:
* Delete a few methods from `UnifiedLog` that were simply invoking the related method in `LogFileUtils`
* Fix `CoreUtils.swallow` to use the passed in `logging`
* Fix `LogCleanerParameterizedIntegrationTest` to close `log` before reopening
* Minor tweaks in `LogSegment` for readability
 
For broader context on this change, please check:

* KAFKA-14470: Move log layer to storage module

Reviewers: Divij Vaidya <diviv@amazon.com>, Satish Duggana <satishd@apache.org>
2023-10-16 06:37:30 -07:00
Mickael Maison 13b2edd9af
KAFKA-15596: Upgrade ZooKeeper to 3.8.3 (#14535)
Reviewers: Luke Chen <showuon@gmail.com>, Divij Vaidya <diviv@amazon.com>
2023-10-12 17:30:23 +02:00
Ismael Juma 4cf86c5d2f
KAFKA-15492: Upgrade and enable spotbugs when building with Java 21 (#14533)
Spotbugs was temporarily disabled as part of KAFKA-15485 to support Kafka build with JDK 21. This PR upgrades the spotbugs version to 4.8.0 which adds support for JDK 21 and enables it's usage on build again.

Reviewers: Divij Vaidya <diviv@amazon.com>
2023-10-12 14:09:10 +02:00
Arnout Engelen 1983ebebc7
MINOR: fix dependencycheck warnings (#14476)
Add suppressions and skip benchmarking/testing projects

Reviewers: Josep Prat <josep.prat@aiven.io>
2023-10-11 16:18:19 +02:00
atu-sharm c223a9c376
KAFKA-15521: Refactor build.gradle to align gradle swagger plugin with swagger dependencies (#14473)
Reviewers: Mickael Maison <mickael.maison@gmail.com>
2023-10-09 12:30:46 +02:00
Satish Duggana 354c9ca0ce
MINOR Added 3.6.0 to system tests (#14488)
Reviewers: Luke Chen <showuon@gmail.com>
2023-10-08 05:29:06 +05:30
Said Boudjelda 951a9fef9d
MINOR: Upgrade zstd-jni to 1.5.5-6 (#14449)
Reviewers: Divij Vaidya <diviv@amazon.com>
2023-10-03 13:31:20 +02:00
Arnout Engelen dcd8c7d05f
MINOR: suppress dependencycheck warning for CVE-2023-35116 (#14460)
Like in most projects, this attack cannot be achieved by an external
attacker in Kafka.

Reviewers: Josep Prat <josep.prat@aiven.io>
2023-10-02 18:38:29 +02:00
Luke Chen e85b17ec5e
KAFKA-15498: upgrade to snappy 1.1.10.5 (#14458)
Release notes - https://github.com/xerial/snappy-java/releases/tag/v1.1.10.5

This release contains adds support for Windows ARM and fixes some dependencies associated with Linux ppc64. 

Reviewers: Josep Prat <josep.prat@aiven.io>
2023-10-02 19:39:41 +08:00
Luke Chen 86450bf9ac
KAFKA-15498: bump snappy-java version to 1.1.10.4 (#14434)
bump snappy-java version to 1.1.10.4, and add more tests to verify the compressed data can be correctly decompressed and read.

For LogCleanerParameterizedIntegrationTest, we increased the message size for snappy decompression since in the new version of snappy, the decompressed size is increasing compared with the previous version. But since the compression algorithm is not kafka's scope, all we need to do is to make sure the compressed data can be successfully decompressed and parsed/read.

Reviewers: Divij Vaidya <diviv@amazon.com>, Ismael Juma <ismael@juma.me.uk>, Josep Prat <josep.prat@aiven.io>, Kamal Chandraprakash <kamal.chandraprakash@gmail.com>
2023-09-27 19:00:50 +08:00
Divij Vaidya 943d05df68
Upgrade Jetty to 9.4.52.v20230823 (#14438)
Reviewers: Viktor Somogyi-Vass <viktorsomogyi@gmail.com>, Luke Chen <showuon@gmail.com>, Satish Duggana <satishd@apache.org>
2023-09-25 22:35:06 +05:30
Ismael Juma 7ba6d7a0b4
MINOR: Update to Scala 2.13.12 (#14430)
It offers a quickfix action for certain errors, includes a number of bug fixes and it
introduces a new warning by default (https://github.com/scala/scala/pull/10462).

In addition to the scala version bump, we also fix the new compiler warnings and
bump the scalafmt version (the previous version failed with the new scala version).

Release notes: https://github.com/scala/scala/releases/tag/v2.13.12

Reviewers: Divij Vaidya <diviv@amazon.com>, Satish Duggana <satishd@apache.org>
2023-09-24 06:05:12 -07:00
Ismael Juma d1ad1d7b70
MINOR: Upgrade gradle, plugins and test libraries (#14431)
To prepare Java 21 support, upgrade gradle, its plugins and test libraries.
Release notes for major and minor updates included below.

The highlight is faster Java compilation by not shutting down the daemon at the end of the build.
Gradle's internal performance tests show up to a 30% build time improvement for builds that are
dominated by compiling Java sources.

Mockito turns out to be a complex case where we use one of 3 different versions depending on
the Scala and Java versions used. In addition, the default mocking strategy changed from `subclass`
to `inline` in Mockito 5.0. We now use `inline` across the board (we previously used both `subclass`
and `inline`). See comments in the relevant parts of the code for more details.

* Gradle 8.3 release notes: https://docs.gradle.org/8.3/release-notes.html
* jmh 1.37: virtual thread support and various bug fixes
* JUnit 5.10.0 release notes: https://junit.org/junit5/docs/5.10.0/release-notes/index.html
* Mockito 5.x release notes:
  * https://github.com/mockito/mockito/releases/tag/v5.0.0
  * https://github.com/mockito/mockito/releases/tag/v5.1.0
  * https://github.com/mockito/mockito/releases/tag/v5.2.0
  * https://github.com/mockito/mockito/releases/tag/v5.3.0
  * https://github.com/mockito/mockito/releases/tag/v5.4.0
  * https://github.com/mockito/mockito/releases/tag/v5.5.0
* EasyMock 5.2.0 release notes: https://github.com/easymock/easymock/releases/tag/easymock-5.2.0

Reviewers: Divij Vaidya <diviv@amazon.com>
2023-09-24 06:01:28 -07:00
Lucas Brutschy 07a18478be
KAFKA-15326: [7/N] Processing thread non-busy waiting (#14180)
Avoid busy waiting for processable tasks. We need to be a bit careful here to not have the task executors to sleep when work is available. We have to make sure to signal on the condition variable any time a task becomes "processable". Here are some situations where a task becomes processable:

- Task is unassigned from another TaskExecutor.
- Task state is changed (should only happen inside when a task is locked inside the polling phase).
- When tasks are unlocked.
- When tasks are added.
- New records available.
- A task is resumed.

So in summary, we

- We should probably lock tasks when they are paused and unlock them when they are resumed. We should also wake the task executors after every polling phase. This belongs to the StreamThread integration work (separate PR). We add DefaultTaskManager.signalProcessableTasks for this.
- We need to awake the task executors in DefaultTaskManager.unassignTask, DefaultTaskManager.unlockTasks and DefaultTaskManager.add.


Reviewers: Walker Carlson <wcarlson@confluent.io>, Bruno Cadonna <cadonna@apache.org>
2023-09-11 09:58:20 +02:00
Lucas Brutschy ee036ed9ef
KAFKA-15319: Upgrade rocksdb to fix CVE-2022-37434 (#14216)
Rocksdbjni<7.9.2 is vulnerable to CVE-2022-37434 due to zlib 1.2.12

Reviewers: Divij Vaidya <diviv@amazon.com>, Bruno Cadonna <cadonna@apache.org>
2023-08-18 18:31:27 +02:00
Christo Lolov 7ecf5183dd
KAFKA-14661: Upgrade Zookeeper to 3.8.1 (#13260)
Reviewers: Divij Vaidya <diviv@amazon.com>, Mickael Maison <mickael.maison@gmail.com>
2023-08-01 16:10:39 +02:00
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
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
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
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
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
Mickael Maison 354db26b95
MINOR: Add 3.5.0 and 3.4.1 to system tests (#13849)
Reviewers: Luke Chen <showuon@gmail.com>
2023-07-12 10:11:44 +02:00
ezio 6afcfba9f3
KAFKA-15159: upgrade minor dependencies (#13982)
Reviewers: Divij Vaidya <diviv@amazon.com>

---------

Co-authored-by: Damon Xie <damon.xie@zoom.us>
2023-07-11 10:39:39 +02:00
Ismael Juma 1f4cbc5d53
MINOR: Add JDK 20 CI build and remove some branch builds (#12948)
It's good for us to add support for Java 20 in preparation for Java 21 - the next LTS.

Given that Scala 2.12 support has been deprecated, a Scala 2.12 variant is not included.

Also remove some branch builds that add load to the CI, but have
low value: JDK 8 & Scala 2.13 (JDK 8 support has been deprecated),
JDK 11 & Scala 2.12 (Scala 2.12 support has been deprecated) and
JDK 17 & Scala 2.12 (Scala 2.12 support has been deprecated).

A newer version of Mockito (4.9.0 -> 4.11.0) is required for Java 20 support, but we
only use it with Scala 2.13+ since it causes compilation errors with Scala 2.12. Similarly,
we upgrade easymock when the Java version is 16 or newer as it's incompatible
with powermock (which doesn't support Java 16 or newer).

Filed KAFKA-15117 for a test that fails with Java 20 (SslTransportLayerTest.testValidEndpointIdentificationCN).

Finally, fixed some lossy conversions that were added after #13582 was submitted.

Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-06-30 01:12:00 -07:00
Divij Vaidya 88e784f7c6
KAFKA-15084: Remove lock contention from RemoteIndexCache (#13850)
Use thread safe Caffeine to cache indexes fetched from RemoteTier locally. This PR removes a lock contention that led to higher fetch latencies as the IO threads spent time unnecessarily waiting on global cache lock while a single thread fetches the index from remote tier. See PR #13850 for details and rejected alternatives.

Reviewers: Luke Chen <showuon@gmail.com>, Satish Duggana <satishd@apache.org>
2023-06-21 18:22:49 +02:00
Ismael Juma dfaae317b8
MINOR: Upgrade Scala for Java 20/21 support (#13840)
Upgrade to Scala 2.13.11 and Scala 2.12.18. A minor test change was required
to fix compilation with Scala 2.13.11.

Scala 2.13 release notes:
* https://github.com/scala/scala/releases/tag/v2.13.11

Scala 2.12 release notes:
* https://github.com/scala/scala/releases/tag/v2.12.16
* https://github.com/scala/scala/releases/tag/v2.12.17
* https://github.com/scala/scala/releases/tag/v2.12.18

Reviewers: Justine Olshan <jolshan@confluent.io>, Josep Prat <josep.prat@aiven.io>
2023-06-20 10:29:23 -07:00
Manyanda Chitimbo 958b41b27a
KAFKA-15096: Update snappy-java to 1.1.10.1 (#13865)
The release notes are available at https://github.com/xerial/snappy-java/releases/tag/v1.1.10.1

Reviewers:  Divij Vaidya <diviv@amazon.com>, Josep Prat <josep.prat@aiven.io>
2023-06-19 10:35:49 +02:00
Mickael Maison 115a033e3c
MINOR: Update LICENSE-binary following snappy upgrade (#13791)
Reviewers: Luke Chen <showuon@gmail.com>
2023-06-01 11:17:54 +02:00
David Mao f9b2b3a047
Upgrade to snappy v1.1.10.0 (#13786)
Snappy v1.1.9.1 has some issues around arm compatibility and glibc library versions shipped by default with certain OS distributions. Snappy v1.1.10.0 uses a glibc LTS version, see: xerial/snappy-java#417 xerial/snappy-java#440

Reviewers: Justine Olshan <jolshan@confluent.io>
2023-05-31 14:46:00 -07:00
atu-sharm fa7818dff5
KAFKA-14994: jose4j is vulnerable to CVE- Improper Cryptographic Algorithm (#13717)
Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2023-05-13 12:42:57 +05:30
Divij Vaidya f578b38f31
MINOR: Update dependencies (minor versions only) (#13673)
All dependency upgrades in the PR are minor upgrades with backward compatible changes. Note that no major version for dependencies have been changed to make it a low risk change. No code changes are required for any of these dependencies.

Reviewers: Luke Chen <showuon@gmail.com>
2023-05-12 17:47:50 +08:00
Divij Vaidya 6bcc497c36
KAFKA-14766: Improve performance of VarInt encoding and decoding (#13312)
Motivation

Reading/writing the protocol buffer varInt32 and varInt64 (also called varLong in our code base) is in the hot path of data plane code in Apache Kafka. We read multiple varInt in a record and in long. Hence, even a minor change in performance could extrapolate to larger performance benefit.

In this PR, we only update varInt32 encoding/decoding.
Changes

This change uses loop unrolling and reduces the amount of repetition of calculations. Based on the empirical results from the benchmark, the code has been modified to pick up the best implementation.
Results

Performance has been evaluated using JMH benchmarks on JDK 17.0.6. Various implementations have been added in the benchmark and benchmarking has been done for different sizes of varints and varlongs. The benchmark for various implementations have been added at ByteUtilsBenchmark.java

Reviewers: Ismael Juma <mlists@juma.me.uk>, Luke Chen <showuon@gmail.com>, Alexandre Dupriez <alexandre.dupriez@gmail.com>
2023-05-05 20:05:20 +08:00
Said Boudjelda a7d0b3f753
MINOR: Upgrade gradle to 8.1.1 (#13625)
Also upgrade gradle plugins:
 - `org.owasp.dependencycheck` gradle plugin to version `8.2.1`
 - `com.github.johnrengelman.shadow gradle` plugin to version `8.1.1`

Gradle release notes:
* https://docs.gradle.org/8.1.1/release-notes.html

Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-04-25 14:31:04 -07:00
Matthew de Detrich 809966a9a0
KAFKA-13299: Accept duplicate listener on port for IPv4/IPv6 (#11478)
Loosens the validation so that Kafka can accept duplicate listeners on the same port but if and only if the listeners are valid IP addresses with one address being an IPv4 address and the other being an IPv6 address.

Reviewers: Josep Prat <jlprat@apache.org>, Luke Chen <showuon@apache.org>
2023-04-19 20:54:07 +02:00
Ron Dagostino e27926f92b
KAFKA-14735: Improve KRaft metadata image change performance at high … (#13280)
topic counts.

Introduces the use of persistent data structures in the KRaft metadata image to avoid copying the entire TopicsImage upon every change.  Performance that was O(<number of topics in the cluster>) is now O(<number of topics changing>), which has dramatic time and GC improvements for the most common topic-related metadata events.  We abstract away the chosen underlying persistent collection library via ImmutableMap<> and ImmutableSet<> interfaces and static factory methods.

Reviewers: Luke Chen <showuon@gmail.com>, Colin P. McCabe <cmccabe@apache.org>, Ismael Juma <ismael@juma.me.uk>, Purshotam Chauhan <pchauhan@confluent.io>
2023-04-17 17:52:28 -04:00
Ismael Juma 9c12e46210
Update zstd to 1.5.5 (#13567)
1.5.4 is a large release that offers significant performance improvements across
multiple scenarios, as well as new features.

1.5.5 is a smaller release that corrects a rare corruption bug and improves performance
in some scenarios.

It looks like 1.5.3 was retracted or never released.

Zstandard release notes:
* 1.5.4: https://github.com/facebook/zstd/releases/tag/v1.5.4
* 1.5.5: https://github.com/facebook/zstd/releases/tag/v1.5.5

zstd-jni diff: https://github.com/luben/zstd-jni/compare/v1.5.2-1...v1.5.5-1

Reviewers: Rajini Sivaram <rajinisivaram@googlemail.com>, Divij Vaidya <diviv@amazon.com>
2023-04-15 12:30:22 -07:00
Chris Egerton e49a5a265f
KAFKA-14783 (KIP-875): New STOPPED state for connectors (#13424)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Yash Mayya <yash.mayya@gmail.com>, Greg Harris <gharris1727@gmail.com>
2023-04-11 09:37:26 -04:00
Spacrocket 71ca8ef4ec
KAFKA-14722: Make BooleanSerde public (#13382)
KAFKA-14722: Make BooleanSerde public (#13328)

Addition of boolean serde
https://cwiki.apache.org/confluence/display/KAFKA/KIP-907%3A+Add+Boolean+Serde+to+public+interface

During the task KAFKA-14491 Victoria added BooleanSerde class, It will be useful to have such class in public package.

Reviewers: Walker Carlson <wcarlson@confluent.io>, Lucas Brutschy <lbrutschy@confluent.io>, Divij Vaidya <diviv@amazon.com>
2023-03-24 10:41:51 -05:00
Juan José Ramos 2092153d7f
KAFKA-14800: Bump snappy-java version to 1.1.9.1 (#13385)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Divij Vaidya <diviv@amazon.com>
2023-03-24 16:27:06 +01:00