This is an automated email from the ASF dual-hosted git repository.
ijuma pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 70a36bd MINOR: Update zstd and use classes with no finalizers (#10120)
70a36bd is described below
commit 70a36bdacbe505a56fbb0cbe314aea88469944ff
Author: Ismael Juma <[email protected]>
AuthorDate: Sat Feb 13 07:28:17 2021 -0800
MINOR: Update zstd and use classes with no finalizers (#10120)
The updated version includes a few optimizations that benefit us:
* Classes with no finalizers (opt-in) that have better GC behavior
* `InputStream.skip()` implementation that uses cached buffers
* Minor buffer recycler optimizations (used for OutputStream only)
Full diff:
https://github.com/luben/zstd-jni/compare/v1.4.8-2...v1.4.8-4
Reviewers: Chia-Ping Tsai <[email protected]>
---
.../src/main/java/org/apache/kafka/common/record/CompressionType.java | 4 ++--
gradle/dependencies.gradle | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git
a/clients/src/main/java/org/apache/kafka/common/record/CompressionType.java
b/clients/src/main/java/org/apache/kafka/common/record/CompressionType.java
index 19a3f8e..c2694ca 100644
--- a/clients/src/main/java/org/apache/kafka/common/record/CompressionType.java
+++ b/clients/src/main/java/org/apache/kafka/common/record/CompressionType.java
@@ -226,9 +226,9 @@ public enum CompressionType {
private static class ZstdConstructors {
// It's ok to reference `BufferPool` since it doesn't load any native
libraries
- static final MethodHandle INPUT =
findConstructor("com.github.luben.zstd.ZstdInputStream",
+ static final MethodHandle INPUT =
findConstructor("com.github.luben.zstd.ZstdInputStreamNoFinalizer",
MethodType.methodType(void.class, InputStream.class,
BufferPool.class));
- static final MethodHandle OUTPUT =
findConstructor("com.github.luben.zstd.ZstdOutputStream",
+ static final MethodHandle OUTPUT =
findConstructor("com.github.luben.zstd.ZstdOutputStreamNoFinalizer",
MethodType.methodType(void.class, OutputStream.class,
BufferPool.class));
}
diff --git a/gradle/dependencies.gradle b/gradle/dependencies.gradle
index 954a495..9340e3c 100644
--- a/gradle/dependencies.gradle
+++ b/gradle/dependencies.gradle
@@ -118,7 +118,7 @@ versions += [
testRetryPlugin: "1.2.0",
zinc: "1.3.5",
zookeeper: "3.5.9",
- zstd: "1.4.8-2"
+ zstd: "1.4.8-4"
]
libs += [
activation: "javax.activation:activation:$versions.activation",