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 @@ io.netty netty-all + + net.openhft chronicle-queue @@ -203,6 +205,40 @@ net.openhft chronicle-threads + + + net.openhft + posix + + + + net.java.dev.jna + jna-platform + + + + com.github.jnr + jnr-ffi + + + + com.github.jnr + jffi + + + + com.github.jnr + jffi + native + + + + com.github.jnr + jnr-constants + + + + org.fusesource sigar 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 @@ jna 5.13.0 + + + + net.java.dev.jna + jna-platform + 5.13.0 + + + + com.github.jnr + jnr-ffi + 2.2.13 + + + org.ow2.asm + asm-analysis + + + org.ow2.asm + asm-commons + + + org.ow2.asm + asm-tree + + + org.ow2.asm + asm-util + + + + + + com.github.jnr + jffi + 1.3.11 + + + + com.github.jnr + jffi + native + 1.3.11 + + + + com.github.jnr + jnr-constants + 0.10.4 + + org.jacoco org.jacoco.agent @@ -645,7 +696,7 @@ net.openhft chronicle-queue - 5.20.123 + 5.23.37 tools @@ -656,7 +707,7 @@ net.openhft chronicle-core - 2.20.126 + 2.23.36 chronicle-analytics @@ -671,7 +722,7 @@ net.openhft chronicle-bytes - 2.20.111 + 2.23.33 annotations @@ -682,7 +733,7 @@ net.openhft chronicle-wire - 2.20.117 + 2.23.39 compiler @@ -693,21 +744,13 @@ net.openhft chronicle-threads - 2.20.111 - - - affinity - net.openhft - - - jna - net.java.dev.jna - - - jna-platform - net.java.dev.jna - - + 2.23.25 + + + + net.openhft + posix + 2.24ea4 com.google.code.findbugs @@ -835,11 +878,18 @@ jctools-core 3.1.0 + org.ow2.asm asm ${asm.version} + + org.ow2.asm + asm-analysis + ${asm.version} + test + org.ow2.asm asm-tree @@ -858,6 +908,7 @@ ${asm.version} test + org.gridkit.jvmtool sjk-cli 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;