Commit Graph

422 Commits

Author SHA1 Message Date
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
Mickael Maison ccfc389a63
KAFKA-14804: Update swagger plugin/dependencies to 2.2.8 (#13388)
Reviewers: David Arthur <mumrah@gmail.com>
2023-03-14 12:06:12 +01:00
Dejan Stojadinović e348da4095
MINOR: Update gradle to 8.0.2 and update several gradle plugins (#13339)
Also removed workaround from `build.gradle` that is no longer required after
the update to Gradle 8.0.2.

Related links:
 - zinc release notes:   https://github.com/sbt/zinc/releases/tag/v1.8.0
 - gradle release notes: https://github.com/gradle/gradle/releases/tag/v8.0.2
 - gradle diff:          https://github.com/gradle/gradle/compare/v8.0.1...v8.0.2

plugins version upgrade details:
 - 'com.github.ben-manes.versions'              0.44.0 -> 0.46.0
 - 'org.owasp.dependencycheck'                     8.0.2 -> 8.1.2
 - 'io.swagger.core.v3.swagger-gradle-plugin' 2.2.0 -> 2.2.8
 - 'org.gradle.test-retry'                                    1.5.1 -> 1.5.2
 - 'com.github.johnrengelman.shadow'           7.1.2 -> 8.1.0

Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-03-04 22:25:00 -08:00
Dejan Stojadinović 72dd401e51
KAFKA-14680: Upgrade gradle version from 7.6 to 8.0.1 (#13205)
Details:
 * gradle upgrade: 7.6 -> 8.0.1
 * spotbugs plugin upgrade: 5.0.9 -> 5.0.13
 * tweaked the mechanics for `-release`/`-source`/`-target` to workaround idiosyncrasies in Gradle 8.0.1 and newer Scala 2.13 versions.
 * streams-scala `test` task no longer triggers the `spotless` task since a newer version is required for Gradle 8 support, but the newer version requires Java 11.
Note: relates to #5479

Gradle upgrade highlights:
* "Scala Incremental Compilation for Multi-Module projects broken in 7.x": https://github.com/gradle/gradle/issues/20101
* "Incremental compilation of java modules is broken with Gradle 7.6": https://github.com/gradle/gradle/issues/23067

Full release notes: https://docs.gradle.org/8.0/release-notes.html

Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-02-23 19:13:43 -08:00
Ron Dagostino cbd46160e9
KAFKA-14731: Upgrade ZooKeeper to 3.6.4 (#13273)
Reviewers: Colin Patrick McCabe <cmccabe@apache.org>
2023-02-21 08:37:48 -05:00
Victoria Xia dcaf95a35f
KAFKA-14491: [8/N] Add serdes for ValueAndTimestamp with null value (#13249)
Introduces a new Serde, that serializes a value and timestamp as a single byte array, where the value may be null (in order to represent putting a tombstone with timestamp into the versioned store).

Part of KIP-889.

Reviewers: Matthias J. Sax <matthias@confluent.io>
2023-02-15 18:07:47 -08:00
Ismael Juma 031d0ff1ba
MINOR: Update build and test dependencies for 3.5 (#13199)
The most recent version that didn't cause compiler or test errors was chosen.

Gradle plugin updates follow, they include minor fixes and support
for newer Java and Gradle versions:

- spotless: 6.10.0 -> 6.13.0
- versions: 0.42.0 -> 0.44.0
- dependencycheck: 7.1.1 -> 8.0.2
- rat: 0.7.1 -> 0.8.0
- spotbugs: 5.0.9 -> 5.0.13
- test-retry: 1.4.0 -> 1.5.1
- scoverage: 7.0.0 -> 7.0.1

Test/benchmark updates:

- jmh: 1.35 -> 1.36
GC profiler and perfasm improvements
https://mail.openjdk.org/pipermail/jmh-dev/2022-November/003553.html

- junit: 5.9.0 -> 5.9.2
Minor fixes
https://junit.org/junit5/docs/current/release-notes/index.html#release-notes-5.9.2

- jqwik: 1.6.5 -> 1.7.2
A number of usability improvements, bug fixes and minor breaking changes
https://jqwik.net/release-notes.html#172

- mockito: 4.6.1 -> 4.9.0
Usability improvements, perf fixes and bug fixes
https://github.com/mockito/mockito/releases/tag/v4.7.0
https://github.com/mockito/mockito/releases/tag/v4.8.0
https://github.com/mockito/mockito/releases/tag/v4.8.1
https://github.com/mockito/mockito/releases/tag/v4.9.0

Reviewers: Stanislav Kozlovski <stanislav_kozlovski@outlook.com>, Luke Chen <showuon@gmail.com>
2023-02-09 15:16:39 +01:00
Satish Duggana 1d3fb76092
KAFKA-14688 Move package org.apache.kafka.server.log.internals to org.apache.kafka.storage.internals.log (#13213)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2023-02-08 09:22:42 +05:30
Ismael Juma 8ac644d2b1
KAFKA-14607: Move Scheduler/KafkaScheduler to server-common (#13092)
There were some concurrency inconsistencies in `KafkaScheduler` flagged by spotBugs
that had to be fixed, summary of changes below:
* Executor is `volatile`
* We always synchronize and check `isStarted` as the first thing within the critical
   section when a mutating operation is performed.
* We don't synchronize (but ensure the executor is not null in a safe way) in read-only
   operations that operate on the executor.

With regards to `MockScheduler/MockTask`:
* Set the type of `nextExecution` to `AtomicLong` and replaced inconsistent synchronization
* Extracted logic into `MockTask.rescheduleIfPeriodic`

Tweaked the `Scheduler` interface a bit:
* Removed `unit` parameter since we always used `ms` except one invocation
* Introduced a couple of `scheduleOnce` overloads to replace the usage of default
   arguments in Scala
* Pulled up `resizeThreadPool` to the interface and removed `isStarted` from the
  interface.

Other cleanups:
* Removed spotBugs exclusion affecting `kafka.log.LogConfig`, which no longer exists.

For broader context, see:
* KAFKA-14470: Move log layer to storage module

Reviewers: Jun Rao <junrao@gmail.com>
2023-01-10 23:51:58 -08:00
José Armando García Sancio 896573f9bc
KAFKA-14279: Add 3.3.x streams system tests (#13077)
Reviewers: Matthias J. Sax <matthias@confluent.io>
2023-01-09 23:37:05 -08:00
Brendan Ribera b8ab09820c
KAFKA-14564: Upgrade netty to 4.1.86 to address CVE-2022-41881, CVE-2022-41915 (#13070)
For KAFKA-14564: upgrade to Netty 4.1.86

Fixes the following:

    CVE-2022-41881
    CVE-2022-41915

Reviewers: Luke Chen <showuon@gmail.com>
2023-01-04 16:55:05 +08:00
Ismael Juma e8232edd24
KAFKA-14477: Move LogValidator and related to storage module (#13012)
Also improved `LogValidatorTest` to cover a bug that was originally
only caught by `LogAppendTimeTest`.

For broader context on this change, please check:

* KAFKA-14470: Move log layer to storage module

Reviewers: Jun Rao <junrao@gmail.com>
2022-12-21 16:57:02 -08:00
Ismael Juma d521f8110e
KAFKA-14473: Move AbstractIndex to storage module (#13007)
For broader context on this change, please check:

* KAFKA-14470: Move log layer to storage module

Reviewers: Jun Rao <junrao@gmail.com>, Satish Duggana <satishd@apache.org>
2022-12-19 19:33:24 -08:00
Patrik Marton 1c10d107fe
KAFKA-14293: Basic Auth filter should set the SecurityContext after a successful login (#12846)
Reviewers: Greg Harris <greg.harris@aiven.io>, Chris Egerton <chrise@aiven.io>
2022-12-05 09:38:40 -05:00
Matthew de Detrich 6ae08c4ee8
KAFKA-14256: Upgrade from Scala 2.13.8 to 2.13.10 (#12675)
In addition to the version bump, we also had to:
* Update the zinc version
* Workaround compiler warnings via suppression (proper fix in a follow up)
* Adjust `testDeleteTopicDoesNotRetryThrottlingQuotaExceededException` to fix a test failure

Release notes:
* https://github.com/scala/scala/releases/tag/v2.13.9
* https://github.com/scala/scala/releases/tag/v2.13.10

Reviewers: Ismael Juma <ismael@juma.me.uk>
2022-12-04 21:02:43 -08:00
Ismael Juma 8d65271a0b
MINOR: Update Gradle to 7.6 (#12918)
The highlights are:
* Support for Java 19
* Support for incremental compilation following a compilation failure
* Flag for individual task rerun (eg "gradle test --rerun")
* Re-use Scala compiler between runs (will be enabled via #12280)

Release notes: https://docs.gradle.org/7.6/release-notes.html

Also adjusted the directory used by `retry_zinc` for the build output from
`build` to `logs` as `gradlew clean` was causing unintended deletion of
the file used by that tool to decide if a retry is required.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-11-30 05:25:56 -08:00
Pratim SC 795390a3c8
KAFKA-14320: Updated Jackson to version 2.13.4 for fixing CVE-2022-42004 (#12840)
* Updated Jackson to version 2.13.4 for fixing CVE-2022-42004, CVE-2020-36518
* Updated Jackson data bind to version 2.13.4.2 for fixing CVE-2022-42004

Co-authored-by: Pratim SC <pratim.sunilkumar.chaudhuri@mercer.com>

 Reviewers: Luke Chen <showuon@gmail.com>, Manikumar Reddy <manikumar.reddy@gmail.com>
2022-11-18 23:28:49 +05:30
Christo Lolov 876c338a60
[KAFKA-14324] Upgrade RocksDB to 7.1.2 (#12809)
Reviewers: Bruno Cadonna <cadonna@confluent.io>, Anna Sophie Blee-Goldman <ableegoldman@apache.org>
2022-11-11 17:48:38 -08:00
Manikumar Reddy 09b8d511f8
MINOR: Upgrade spotbugs dependency (#12768)
Reviewers: Ismael Juma <ismael@juma.me.uk>
2022-10-24 23:11:31 +05:30
José Armando García Sancio 5c5dcb7a96
MINOR; Use 3.3.1 release for system test (#12714)
The following files are available in https://s3-us-west-2.amazonaws.com/kafka-packages/:

kafka-streams-3.3.1-test.jar
kafka_2.12-3.3.1.tgz
kafka_2.13-3.3.1.tgz

Reviewers: Colin P. McCabe <cmccabe@apache.org>
2022-10-04 16:19:24 -07:00
Kirk True 8e43548175
KAFKA-13725: KIP-768 OAuth code mixes public and internal classes in same package (#12039)
* KAFKA-13725: KIP-768 OAuth code mixes public and internal classes in same package

Move classes into a sub-package of "internal" named "secured" that
matches the layout more closely of the "unsecured" package.

Replaces the concrete implementations in the former packages with
sub-classes of the new package layout and marks them as deprecated. If
anyone is already using the newer OAuth code, this should still work.

* Fix checkstyle and spotbugs violations

Co-authored-by: Kirk True <kirk@mustardgrain.com>

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-09-23 13:15:15 +05:30
Manikumar Reddy 3e8e082fab MINOR: Bump latest 2.8 version to 2.8.2 2022-09-19 17:18:47 +05:30
Tom Bentley 352c71ffb5
MINOR: Update release versions for upgrade tests with 3.0.2, 3.1.2, 3.2.3 release (#12661)
Updates release versions in files that are used for upgrade test with the 3.0.2, 3.1.2, 3.2.3 release version.
2022-09-19 17:13:40 +05:30
Matthew de Detrich e138772ba5
MINOR: Update Scalafmt to latest version (#12475)
Reviewers: Divij Vaidya <diviv@amazon.com>, Chris Egerton <fearthecellos@gmail.com>
2022-09-12 10:05:15 -04:00
Ismael Juma 3494d6eea3
MINOR: Upgrade gradle to 7.5.1 and bump other build/test dependencies (#12495)
Gradle 7.5.1:
* Important bug fixes including https://github.com/gradle/gradle/issues/21400
* Release notes: https://docs.gradle.org/7.5.1/release-notes.html

JUnit 5.9.0
* Support for open test reporting and configurable thread mode for @Timeout
* Release notes: https://junit.org/junit5/docs/current/release-notes/index.html#release-notes-5.9.0

test-retry-gradle-plugin 1.4.0
* Support for Gradle 7.6 and minor fixes
* Release notes:
  * https://github.com/gradle/test-retry-gradle-plugin/releases/tag/v1.3.2
  * https://github.com/gradle/test-retry-gradle-plugin/releases/tag/v1.4.0

spotbugs-gradle-plugin
* Minor fixes
* Release notes:
  * https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.7
  * https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.8
  * https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/5.0.9
 
dependency-check-gradle-plugin
* Minor improvements and false positive fixes
* Release notes:
  * https://github.com/jeremylong/DependencyCheck/releases/tag/v7.0.4
  * https://github.com/jeremylong/DependencyCheck/releases/tag/v7.1.0

rat-gradle-plugin
* Minor fixes
* Diff: https://github.com/eskatos/creadur-rat-gradle/compare/v0.7.0...v0.7.1

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
2022-08-10 06:07:54 -07:00
Dalibor Plavcic eeee8e206b
MINOR: Upgrade mockito test dependencies (#12460)
## Changes
- **mockito: 4.4.0 -> 4.6.1** (https://github.com/mockito/mockito/releases)
Most important updates:
  - Fixes https://github.com/mockito/mockito/issues/2648 : Add support for customising strictness via @mock annotation and MockSettings https://github.com/mockito/mockito/pull/2650

## Why is this change needed?

According to the [Mockito documentation](https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#when(T)) :
> Although it is possible to verify a stubbed invocation, usually it's just redundant. Let's say you've stubbed foo.bar(). If your code cares what foo.bar() returns then something else breaks(often before even verify() gets executed). If your code doesn't care what get(0) returns then it should not be stubbed. 

While working on the [Replace EasyMock and PowerMock with Mockito for StreamsMetricsImplTest ](https://issues.apache.org/jira/browse/KAFKA-12947) I noticed that described behavior wasn't applied when you create a new `mock` like this.

```java
        final Metrics metrics = mock(Metrics.class);
        when(metrics.metric(metricName)).thenReturn(null);

        ... invoke SUT

        verify(metrics).metric(metricName); // this should be redundant (according to docs)

```

After further investigation I figured out that described behaviour wasn't implemented until`v4.6.1`.

With this change we are now able to mock objects like this:

```java
   Foo explicitStrictMock = mock(Foo.class, withSettings().strictness(Strictness.STRICT_STUBS));
```
- link to docs: [MockSettings.html#strictness](https://javadoc.io/static/org.mockito/mockito-core/4.6.1/org/mockito/quality/Strictness.html#STRICT_STUBS)

It looks like I can accomplish the same thing by using the `@RunWith(MockitoJUnitRunner.StrictStubs.class)
` instead of the `@RunWith(MockitoJUnitRunner.class)` so mockito dependency version update is not mandatory, but it would be nice to stay up-to-date and use the latest version (it's up to MR reviewer to decide if we are going to merge this now, or just close the MR and update mockito version later).

Reviewers: Ismael Juma <ismael@juma.me.uk>
2022-08-09 10:08:57 -07:00
Andrew Borley fdc19fbe21
KAFKA-14107: Upgrade Jetty version for CVE fixes (#12440)
Reviewers: Mickael Maison <mickael.maison@gmail.com>, Aaron Freeland <afreeland@gmail.com>
2022-08-05 23:29:04 +02:00
Ismael Juma 348474e2ae
MINOR: Upgrade to Gradle 7.5 (#12413)
Highlights:
* The default Scala Zinc version was updated from 1.3.5 to 1.6.1
* Multiple Checkstyle tasks may now run in parallel within a project
* Support for Java 18
* Much more responsive continuous builds on Windows and macOS
* Improved diagnostics for dependency resolution

Some of our tests require java.util and java.lang modules to be open,
so do it explicitly given the following Gradle bug fix:

> When running on Java 9+, Gradle no longer opens the java.base/java.util
> and java.base/java.lang JDK modules for all Test tasks. In some cases,
> this would cause code to pass during testing but fail at runtime.

Release notes: https://docs.gradle.org/7.5/release-notes.html

Reviewers:  Manikumar Reddy <manikumar.reddy@gmail.com>, Luke Chen <showuon@gmail.com>
2022-07-26 05:58:50 -07:00