This is an automated email from the ASF dual-hosted git repository.
mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new eee211fdbb Update OpenHFT dependencies (chronicle-queue,
chronicle-core, chronicle-bytes, chronicle-wire, chronicle-threads)
eee211fdbb is described below
commit eee211fdbb517c1b0e0a8635e0813bda7cf655e5
Author: Mick Semb Wever <[email protected]>
AuthorDate: Fri Feb 10 09:16:14 2023 +0100
Update OpenHFT dependencies (chronicle-queue, chronicle-core,
chronicle-bytes, chronicle-wire, chronicle-threads)
Some transitive dependencies to these have also been added to raise their
versions. asm-* transitive dependencies have been excluded.
patch by Mick Semb Wever; reviewed by Ekaterina Dimitrova for
CASSANDRA-18049
---
.build/cassandra-deps-template.xml | 36 +++++++++
.build/parent-pom-template.xml | 89 +++++++++++++++++-----
CHANGES.txt | 1 +
conf/jvm11-server.options | 1 +
conf/jvm17-server.options | 1 +
.../org/apache/cassandra/utils/binlog/BinLog.java | 12 ++-
6 files changed, 120 insertions(+), 20 deletions(-)
diff --git a/.build/cassandra-deps-template.xml
b/.build/cassandra-deps-template.xml
index b1db0fd0b7..69a184a832 100644
--- a/.build/cassandra-deps-template.xml
+++ b/.build/cassandra-deps-template.xml
@@ -183,6 +183,8 @@
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</dependency>
+
+ <!-- chronicle queue, and fixed transitive dependencies -->
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-queue</artifactId>
@@ -203,6 +205,40 @@
<groupId>net.openhft</groupId>
<artifactId>chronicle-threads</artifactId>
</dependency>
+ <dependency>
+ <!-- transitive to chronicle-core -->
+ <groupId>net.openhft</groupId>
+ <artifactId>posix</artifactId>
+ </dependency>
+ <dependency>
+ <!-- transitive to posix to chronicle-core -->
+ <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna-platform</artifactId>
+ </dependency>
+ <dependency>
+ <!-- transitive to posix to chronicle-core -->
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jnr-ffi</artifactId>
+ </dependency>
+ <dependency>
+ <!-- transitive to jnr-ffi to posix to chronicle-core -->
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jffi</artifactId>
+ </dependency>
+ <dependency>
+ <!-- transitive to jnr-ffi to posix to chronicle-core -->
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jffi</artifactId>
+ <classifier>native</classifier>
+ </dependency>
+ <dependency>
+ <!-- transitive to jnr-ffi to chronicle-core -->
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jnr-constants</artifactId>
+ </dependency>
+
+ <!-- end of chronicle-queue -->
+
<dependency>
<groupId>org.fusesource</groupId>
<artifactId>sigar</artifactId>
diff --git a/.build/parent-pom-template.xml b/.build/parent-pom-template.xml
index 6809fcd74a..70f85d033e 100644
--- a/.build/parent-pom-template.xml
+++ b/.build/parent-pom-template.xml
@@ -508,6 +508,57 @@
<artifactId>jna</artifactId>
<version>5.13.0</version>
</dependency>
+
+ <dependency>
+ <!-- transitive to posix to chronicle-core, declared explicit to use
newer version -->
+ <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna-platform</artifactId>
+ <version>5.13.0</version>
+ </dependency>
+ <dependency>
+ <!-- transitive to posix to chronicle-core, declared explicit to use
newer version -->
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jnr-ffi</artifactId>
+ <version>2.2.13</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-analysis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-commons</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-tree</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-util</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <!-- transitive to jnr-ffi to posix to chronicle-core, declared
explicit to use newer version -->
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jffi</artifactId>
+ <version>1.3.11</version>
+ </dependency>
+ <dependency>
+ <!-- transitive to jnr-ffi to posix to chronicle-core, declared
explicit to use newer version -->
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jffi</artifactId>
+ <classifier>native</classifier>
+ <version>1.3.11</version>
+ </dependency>
+ <dependency>
+ <!-- transitive to posix to chronicle-core, declared explicit to use
newer version -->
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jnr-constants</artifactId>
+ <version>0.10.4</version>
+ </dependency>
+
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
@@ -645,7 +696,7 @@
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-queue</artifactId>
- <version>5.20.123</version>
+ <version>5.23.37</version>
<exclusions>
<exclusion>
<artifactId>tools</artifactId>
@@ -656,7 +707,7 @@
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-core</artifactId>
- <version>2.20.126</version>
+ <version>2.23.36</version>
<exclusions>
<exclusion>
<artifactId>chronicle-analytics</artifactId>
@@ -671,7 +722,7 @@
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-bytes</artifactId>
- <version>2.20.111</version>
+ <version>2.23.33</version>
<exclusions>
<exclusion>
<artifactId>annotations</artifactId>
@@ -682,7 +733,7 @@
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-wire</artifactId>
- <version>2.20.117</version>
+ <version>2.23.39</version>
<exclusions>
<exclusion>
<artifactId>compiler</artifactId>
@@ -693,21 +744,13 @@
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle-threads</artifactId>
- <version>2.20.111</version>
- <exclusions>
- <exclusion>
- <artifactId>affinity</artifactId>
- <groupId>net.openhft</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jna</artifactId>
- <groupId>net.java.dev.jna</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jna-platform</artifactId>
- <groupId>net.java.dev.jna</groupId>
- </exclusion>
- </exclusions>
+ <version>2.23.25</version>
+ </dependency>
+ <dependency>
+ <!-- transitive to chronicle-queue -->
+ <groupId>net.openhft</groupId>
+ <artifactId>posix</artifactId>
+ <version>2.24ea4</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
@@ -835,11 +878,18 @@
<artifactId>jctools-core</artifactId>
<version>3.1.0</version>
</dependency>
+
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.ow2.asm</groupId>
+ <artifactId>asm-analysis</artifactId>
+ <version>${asm.version}</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
@@ -858,6 +908,7 @@
<version>${asm.version}</version>
<scope>test</scope>
</dependency>
+
<dependency>
<groupId>org.gridkit.jvmtool</groupId>
<artifactId>sjk-cli</artifactId>
diff --git a/CHANGES.txt b/CHANGES.txt
index 149c9b0992..1b6dcf3c5e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
5.0
+ * Update OpenHFT dependencies (chronicle-queue, chronicle-core,
chronicle-bytes, chronicle-wire, chronicle-threads) (CASSANDRA-18049)
* Remove org.apache.cassandra.hadoop code (CASSANDRA-18323)
* Remove deprecated CQL functions dateOf and unixTimestampOf (CASSANDRA-18328)
* Remove DateTieredCompactionStrategy (CASSANDRA-18043)
diff --git a/conf/jvm11-server.options b/conf/jvm11-server.options
index 0f73d4cfed..92b987922d 100644
--- a/conf/jvm11-server.options
+++ b/conf/jvm11-server.options
@@ -61,6 +61,7 @@
-Djdk.attach.allowAttachSelf=true
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
+--add-exports java.base/jdk.internal.util=ALL-UNNAMED
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED
diff --git a/conf/jvm17-server.options b/conf/jvm17-server.options
index 03a0cd8752..3e8d2cef76 100644
--- a/conf/jvm17-server.options
+++ b/conf/jvm17-server.options
@@ -73,6 +73,7 @@
#chronicle, AuditLog https://chronicle.software/chronicle-support-java-17/
--add-exports java.base/java.lang.ref=ALL-UNNAMED
+--add-exports java.base/jdk.internal.util=ALL-UNNAMED
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
diff --git a/src/java/org/apache/cassandra/utils/binlog/BinLog.java
b/src/java/org/apache/cassandra/utils/binlog/BinLog.java
index 43ff67e460..ee8ce55ad6 100644
--- a/src/java/org/apache/cassandra/utils/binlog/BinLog.java
+++ b/src/java/org/apache/cassandra/utils/binlog/BinLog.java
@@ -35,6 +35,7 @@ import org.apache.cassandra.io.util.File;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import net.openhft.chronicle.core.io.BackgroundResourceReleaser;
import net.openhft.chronicle.queue.ChronicleQueue;
import net.openhft.chronicle.queue.impl.single.SingleChronicleQueue;
import net.openhft.chronicle.queue.impl.single.SingleChronicleQueueBuilder;
@@ -42,6 +43,7 @@ import net.openhft.chronicle.queue.ExcerptAppender;
import net.openhft.chronicle.queue.RollCycles;
import net.openhft.chronicle.wire.WireOut;
import net.openhft.chronicle.wire.WriteMarshallable;
+import net.openhft.posix.PosixAPI;
import org.apache.cassandra.concurrent.NamedThreadFactory;
import org.apache.cassandra.io.FSError;
import org.apache.cassandra.utils.JVMStabilityInspector;
@@ -75,6 +77,13 @@ public class BinLog implements Runnable
public static final String VERSION = "version";
public static final String TYPE = "type";
+ static
+ {
+ // Avoid the chronicle announcement which is commercial advertisement,
and debug info we already print at startup
+ //
https://github.com/OpenHFT/Chronicle-Core/blob/chronicle-core-2.23.36/src/main/java/net/openhft/chronicle/core/announcer/Announcer.java#L32-L33
+ System.setProperty("chronicle.announcer.disable", "true");
+ }
+
private ChronicleQueue queue;
private ExcerptAppender appender;
@VisibleForTesting
@@ -122,6 +131,7 @@ public class BinLog implements Runnable
private BinLog(Path path, BinLogOptions options, BinLogArchiver archiver)
{
+ Preconditions.checkNotNull(PosixAPI.posix(), "Cannot initialize
OpenHFT Posix");
Preconditions.checkNotNull(path, "path was null");
Preconditions.checkNotNull(options.roll_cycle, "roll_cycle was null");
Preconditions.checkArgument(options.max_queue_weight > 0,
"max_queue_weight must be > 0");
@@ -135,7 +145,6 @@ public class BinLog implements Runnable
appender = queue.acquireAppender();
this.blocking = options.block;
this.path = path;
-
this.options = options;
}
@@ -170,6 +179,7 @@ public class BinLog implements Runnable
shouldContinue = false;
sampleQueue.put(NO_OP);
+ BackgroundResourceReleaser.stop();
binLogThread.join();
appender.close();
appender = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]