This is an automated email from the ASF dual-hosted git repository. jonmeredith pushed a commit to branch cassandra-5.0 in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit d2f8e8e10546a229d7280e3bf70780ccdbcb7320 Merge: 410018ab16 ac3b356063 Author: Jon Meredith <jonmered...@apache.org> AuthorDate: Thu Aug 24 16:44:04 2023 -0600 Merge branch 'cassandra-4.1' into cassandra-5.0 .build/parent-pom-template.xml | 2 +- build.xml | 1 + .../utils/RMIClientSocketFactoryImpl.java | 21 +++++- .../apache/cassandra/utils/ReflectionUtils.java | 44 ++++++++++- .../cassandra/distributed/impl/Instance.java | 5 +- .../cassandra/distributed/impl/IsolatedJmx.java | 87 +++++++++------------- .../cassandra/distributed/shared/ClusterUtils.java | 34 +++++++-- .../distributed/test/ResourceLeakTest.java | 54 ++++++++------ .../distributed/test/jmx/JMXFeatureTest.java | 85 ++++++++++++++------- .../distributed/test/jmx/JMXGetterCheckTest.java | 46 +++++++++--- .../commitlog/CommitLogSegmentManagerCDCTest.java | 2 +- 11 files changed, 259 insertions(+), 122 deletions(-) diff --cc .build/parent-pom-template.xml index 7d80e5160d,0000000000..ba1e2bb5a9 mode 100644,000000..100644 --- a/.build/parent-pom-template.xml +++ b/.build/parent-pom-template.xml @@@ -1,1209 -1,0 +1,1209 @@@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>apache</artifactId> + <groupId>org.apache</groupId> + <version>22</version> + </parent> + <groupId>org.apache.cassandra</groupId> + <artifactId>cassandra-parent</artifactId> + <version>@version@</version> + <packaging>pom</packaging> + <name>Apache Cassandra</name> + <description>The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together Dynamo's fully distributed design and Bigtable's ColumnFamily-based data model.</description> + <url>https://cassandra.apache.org</url> + <inceptionYear>2009</inceptionYear> + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url> + </license> + </licenses> + <properties> + <bytebuddy.version>1.12.13</bytebuddy.version> + <byteman.version>4.0.20</byteman.version> + <ohc.version>0.5.1</ohc.version> + + <!-- These are referenced in build.xml, so need to be propagated from there --> + <asm.version>@asm.version@</asm.version> + <jamm.version>@jamm.version@</jamm.version> + <allocation-instrumenter.version>@allocation-instrumenter.version@</allocation-instrumenter.version> + <ecj.version>@ecj.version@</ecj.version> + <jacoco.version>@jacoco.version@</jacoco.version> + <jflex.version>@jflex.version@</jflex.version> + </properties> + <developers> + <developer> + <id>adelapena</id> + <name>Andres de la Peña</name> + </developer> + <developer> + <id>alakshman</id> + <name>Avinash Lakshman</name> + </developer> + <developer> + <id>aleksey</id> + <name>Aleksey Yeschenko</name> + </developer> + <developer> + <id>amorton</id> + <name>Aaron Morton</name> + </developer> + <developer> + <id>aweisberg</id> + <name>Ariel Weisberg</name> + </developer> + <developer> + <id>bdeggleston</id> + <name>Blake Eggleston</name> + </developer> + <developer> + <id>benedict</id> + <name>Benedict Elliott Smith</name> + </developer> + <developer> + <id>benjamin</id> + <name>Benjamin Lerer</name> + </developer> + <developer> + <id>blambov</id> + <name>Branimir Lambov</name> + </developer> + <developer> + <id>brandonwilliams</id> + <name>Brandon Williams</name> + </developer> + <developer> + <id>carl</id> + <name>Carl Yeksigian</name> + </developer> + <developer> + <id>dbrosius</id> + <name>David Brosiusd</name> + </developer> + <developer> + <id>dikang</id> + <name>Dikang Gu</name> + </developer> + <developer> + <id>eevans</id> + <name>Eric Evans</name> + </developer> + <developer> + <id>edimitrova</id> + <name>Ekaterina Dimitrova</name> + </developer> + <developer> + <id>gdusbabek</id> + <name>Gary Dusbabek</name> + </developer> + <developer> + <id>goffinet</id> + <name>Chris Goffinet</name> + </developer> + <developer> + <id>ifesdjeen</id> + <name>Alex Petrov</name> + </developer> + <developer> + <id>jaakko</id> + <name>Laine Jaakko Olavi</name> + </developer> + <developer> + <id>jake</id> + <name>T Jake Luciani</name> + </developer> + <developer> + <id>jasonbrown</id> + <name>Jason Brown</name> + </developer> + <developer> + <id>jbellis</id> + <name>Jonathan Ellis</name> + </developer> + <developer> + <id>jfarrell</id> + <name>Jake Farrell</name> + </developer> + <developer> + <id>jjirsa</id> + <name>Jeff Jirsa</name> + </developer> + <developer> + <id>jkni</id> + <name>Joel Knighton</name> + </developer> + <developer> + <id>jmckenzie</id> + <name>Josh McKenzie</name> + </developer> + <developer> + <id>johan</id> + <name>Johan Oskarsson</name> + </developer> + <developer> + <id>junrao</id> + <name>Jun Rao</name> + </developer> + <developer> + <id>jzhuang</id> + <name>Jay Zhuang</name> + </developer> + <developer> + <id>kohlisankalp</id> + <name>Sankalp Kohli</name> + </developer> + <developer> + <id>marcuse</id> + <name>Marcus Eriksson</name> + </developer> + <developer> + <id>mck</id> + <name>Michael Semb Wever</name> + </developer> + <developer> + <id>mishail</id> + <name>Mikhail Stepura</name> + </developer> + <developer> + <id>mshuler</id> + <name>Michael Shuler</name> + </developer> + <developer> + <id>paulo</id> + <name>Paulo Motta</name> + </developer> + <developer> + <id>pmalik</id> + <name>Prashant Malik</name> + </developer> + <developer> + <id>rstupp</id> + <name>Robert Stupp</name> + </developer> + <developer> + <id>scode</id> + <name>Peter Schuller</name> + </developer> + <developer> + <id>beobal</id> + <name>Sam Tunnicliffe</name> + </developer> + <developer> + <id>slebresne</id> + <name>Sylvain Lebresne</name> + </developer> + <developer> + <id>stefania</id> + <name>Stefania Alborghetti</name> + </developer> + <developer> + <id>tylerhobbs</id> + <name>Tyler Hobbs</name> + </developer> + <developer> + <id>vijay</id> + <name>Vijay Parthasarathy</name> + </developer> + <developer> + <id>xedin</id> + <name>Pavel Yaskevich</name> + </developer> + <developer> + <id>yukim</id> + <name>Yuki Morishita</name> + </developer> + <developer> + <id>zznate</id> + <name>Nate McCall</name> + </developer> + <developer> + <id>smiklosovic</id> + <name>Stefan Miklosovic</name> + </developer> + </developers> + <scm> + <connection>scm:https://gitbox.apache.org/repos/asf/cassandra.git</connection> + <developerConnection>scm:https://gitbox.apache.org/repos/asf/cassandra.git</developerConnection> + <url>https://gitbox.apache.org/repos/asf?p=cassandra.git;a=tree</url> + </scm> + + <profiles> + <profile> + <id>x86_64</id> + <activation> + <os> + <!-- we need something as a default even if it doesn't successfully load the .so files. --> + <arch>!aarch64</arch> + </os> + </activation> + <dependencies> + <dependency> + <groupId>software.amazon.cryptools</groupId> + <artifactId>AmazonCorrettoCryptoProvider</artifactId> + <classifier>linux-x86_64</classifier> + <version>2.2.0</version> + <scope>provided</scope> + </dependency> + </dependencies> + </profile> + <profile> + <id>aarch_64</id> + <activation> + <os> + <arch>aarch64</arch> + </os> + </activation> + <dependencies> + <dependency> + <groupId>software.amazon.cryptools</groupId> + <artifactId>AmazonCorrettoCryptoProvider</artifactId> + <classifier>linux-aarch_64</classifier> + <version>2.2.0</version> + <scope>provided</scope> + </dependency> + </dependencies> + </profile> + </profiles> + + <dependencyManagement> + <!-- + Dependency metadata is specified here (version, scope, exclusions, etc.), then referenced in child POMs by groupId and + artifactId. + --> + <dependencies> + <dependency> + <groupId>org.xerial.snappy</groupId> + <artifactId>snappy-java</artifactId> + <version>1.1.10.1</version> + </dependency> + <dependency> + <groupId>org.lz4</groupId> + <artifactId>lz4-java</artifactId> + <version>1.8.0</version> + </dependency> + <dependency> + <groupId>com.ning</groupId> + <artifactId>compress-lzf</artifactId> + <version>0.8.4</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.github.luben</groupId> + <artifactId>zstd-jni</artifactId> + <version>1.5.5-1</version> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>32.0.1-jre</version> + <exclusions> + <exclusion> + <artifactId>jsr305</artifactId> + <groupId>com.google.code.findbugs</groupId> + </exclusion> + <exclusion> + <artifactId>animal-sniffer-annotations</artifactId> + <groupId>org.codehaus.mojo</groupId> + </exclusion> + <exclusion> + <artifactId>listenablefuture</artifactId> + <groupId>com.google.guava</groupId> + </exclusion> + <exclusion> + <artifactId>checker-qual</artifactId> + <groupId>org.checkerframework</groupId> + </exclusion> + <exclusion> + <artifactId>error_prone_annotations</artifactId> + <groupId>com.google.errorprone</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.google.jimfs</groupId> + <artifactId>jimfs</artifactId> + <version>1.1</version> + <exclusions> + <exclusion> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hdrhistogram</groupId> + <artifactId>HdrHistogram</artifactId> + <version>2.1.9</version> + </dependency> + <dependency> + <groupId>commons-cli</groupId> + <artifactId>commons-cli</artifactId> + <version>1.5.0</version> + </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.9</version> + </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.11.0</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.11</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-math3</artifactId> + <version>3.2</version> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr</artifactId> + <version>3.5.2</version> + <scope>provided</scope> + <exclusions> + <exclusion> + <artifactId>stringtemplate</artifactId> + <groupId>org.antlr</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>ST4</artifactId> + <version>4.0.8</version> + </dependency> + <dependency> + <groupId>org.antlr</groupId> + <artifactId>antlr-runtime</artifactId> + <version>3.5.2</version> + <exclusions> + <exclusion> + <artifactId>stringtemplate</artifactId> + <groupId>org.antlr</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.25</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>log4j-over-slf4j</artifactId> + <version>1.7.25</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>jcl-over-slf4j</artifactId> + <version>1.7.25</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + <version>1.2.9</version> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <version>1.2.9</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>2.13.2</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.13.2.2</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + <version>2.13.2</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.datatype</groupId> + <artifactId>jackson-datatype-jsr310</artifactId> + <version>2.13.2</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.dataformat</groupId> + <artifactId>jackson-dataformat-yaml</artifactId> + <version>2.13.2</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>snakeyaml</artifactId> + <groupId>org.yaml</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.boundary</groupId> + <artifactId>high-scale-lib</artifactId> + <version>1.0.6</version> + </dependency> + <dependency> + <groupId>com.github.jbellis</groupId> + <artifactId>jamm</artifactId> + <version>${jamm.version}</version> + </dependency> + <dependency> + <groupId>org.yaml</groupId> + <artifactId>snakeyaml</artifactId> + <version>1.26</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>hamcrest-core</artifactId> + <groupId>org.hamcrest</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>4.7.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-inline</artifactId> + <version>4.7.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.quicktheories</groupId> + <artifactId>quicktheories</artifactId> + <version>0.26</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.code.java-allocation-instrumenter</groupId> + <artifactId>java-allocation-instrumenter</artifactId> + <version>${allocation-instrumenter.version}</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>guava</artifactId> + <groupId>com.google.guava</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.apache.cassandra</groupId> + <artifactId>harry-core</artifactId> + <version>0.0.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.reflections</groupId> + <artifactId>reflections</artifactId> + <version>0.10.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.cassandra</groupId> + <artifactId>dtest-api</artifactId> - <version>0.0.15</version> ++ <version>0.0.16</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.github.tomakehurst</groupId> + <artifactId>wiremock-jre8</artifactId> + <version>2.35.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.puppycrawl.tools</groupId> + <artifactId>checkstyle</artifactId> + <version>10.12.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>net.java.dev.jna</groupId> + <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> + <version>${jacoco.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.jacoco</groupId> + <artifactId>org.jacoco.ant</artifactId> + <version>${jacoco.version}</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>asm</artifactId> + <groupId>org.ow2.asm</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.jboss.byteman</groupId> + <artifactId>byteman-install</artifactId> + <version>${byteman.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss.byteman</groupId> + <artifactId>byteman</artifactId> + <version>${byteman.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss.byteman</groupId> + <artifactId>byteman-submit</artifactId> + <version>${byteman.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.jboss.byteman</groupId> + <artifactId>byteman-bmunit</artifactId> + <version>${byteman.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>${bytebuddy.version}</version> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy-agent</artifactId> + <version>${bytebuddy.version}</version> + </dependency> + <dependency> + <groupId>org.openjdk.jmh</groupId> + <artifactId>jmh-core</artifactId> + <version>1.37</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.openjdk.jmh</groupId> + <artifactId>jmh-generator-annprocess</artifactId> + <version>1.37</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.ant</groupId> + <artifactId>ant-junit</artifactId> + <version>1.10.12</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.cassandra</groupId> + <artifactId>cassandra-all</artifactId> + <version>4.1-alpha2-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-core</artifactId> + <version>3.1.5</version> + </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-jvm</artifactId> + <version>3.1.5</version> + </dependency> + <dependency> + <groupId>io.dropwizard.metrics</groupId> + <artifactId>metrics-logback</artifactId> + <version>3.1.5</version> + </dependency> + <dependency> + <groupId>com.addthis.metrics</groupId> + <artifactId>reporter-config3</artifactId> + <version>3.0.3</version> + <exclusions> + <exclusion> + <artifactId>hibernate-validator</artifactId> + <groupId>org.hibernate</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.mindrot</groupId> + <artifactId>jbcrypt</artifactId> + <version>0.4</version> + </dependency> + <dependency> + <groupId>io.airlift</groupId> + <artifactId>airline</artifactId> + <version>0.8</version> + <exclusions> + <exclusion> + <artifactId>jsr305</artifactId> + <groupId>com.google.code.findbugs</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-all</artifactId> + <version>4.1.96.Final</version> + <exclusions> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-dns</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-haproxy</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-http2</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-http</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-memcache</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-mqtt</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-redis</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-smtp</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-socks</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-stomp</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-codec-xml</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-transport-udt</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-transport-sctp</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-transport-rxtx</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-resolver-dns</artifactId> + </exclusion> + <exclusion> + <groupId>io.netty</groupId> + <artifactId>netty-resolver-dns-classes-macos</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-tcnative-boringssl-static</artifactId> + <version>2.0.61.Final</version> + </dependency> + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk18on</artifactId> + <version>1.76</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-native-epoll</artifactId> + <version>4.1.96.Final</version> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-native-epoll</artifactId> + <version>4.1.96.Final</version> + <classifier>linux-x86_64</classifier> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-transport-native-epoll</artifactId> + <version>4.1.96.Final</version> + <classifier>linux-aarch_64</classifier> + </dependency> + + <!-- chronicle-queue deps --> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-queue</artifactId> + <version>5.23.37</version> + <exclusions> + <exclusion> + <artifactId>tools</artifactId> + <groupId>com.sun</groupId> + </exclusion> + <exclusion> + <!-- pulls in affinity-3.23ea1 which pulls in third-party-bom-3.22.4-SNAPSHOT --> + <groupId>net.openhft</groupId> + <artifactId>affinity</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-core</artifactId> + <version>2.23.36</version> + <exclusions> + <exclusion> + <artifactId>chronicle-analytics</artifactId> + <groupId>net.openhft</groupId> + </exclusion> + <exclusion> + <artifactId>annotations</artifactId> + <groupId>org.jetbrains</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-bytes</artifactId> + <version>2.23.33</version> + <exclusions> + <exclusion> + <artifactId>annotations</artifactId> + <groupId>org.jetbrains</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-wire</artifactId> + <version>2.23.39</version> + <exclusions> + <exclusion> + <artifactId>compiler</artifactId> + <groupId>net.openhft</groupId> + </exclusion> + <exclusion> + <!-- pulls in affinity-3.23ea1 which pulls in third-party-bom-3.22.4-SNAPSHOT --> + <groupId>net.openhft</groupId> + <artifactId>affinity</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>net.openhft</groupId> + <artifactId>chronicle-threads</artifactId> + <version>2.23.25</version> + <exclusions> + <exclusion> + <!-- pulls in affinity-3.23ea1 which pulls in third-party-bom-3.22.4-SNAPSHOT --> + <groupId>net.openhft</groupId> + <artifactId>affinity</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <!-- transitive to chronicle-queue, declared explicit to use newer version --> + <groupId>net.openhft</groupId> + <artifactId>affinity</artifactId> + <version>3.23.3</version> + </dependency> + <dependency> + <!-- transitive to chronicle-queue, declared explicit to use newer version --> + <groupId>net.openhft</groupId> + <artifactId>posix</artifactId> + <version>2.24ea4</version> + </dependency> + <!-- end of chronicle-queue --> + + <dependency> + <groupId>com.google.code.findbugs</groupId> + <artifactId>jsr305</artifactId> + <version>2.0.2</version> + </dependency> + <dependency> + <groupId>com.clearspring.analytics</groupId> + <artifactId>stream</artifactId> + <version>2.5.2</version> + <exclusions> + <exclusion> + <artifactId>fastutil</artifactId> + <groupId>it.unimi.dsi</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.datastax.cassandra</groupId> + <artifactId>cassandra-driver-core</artifactId> + <version>3.11.0</version> + <classifier>shaded</classifier> + <exclusions> + <exclusion> + <artifactId>netty-buffer</artifactId> + <groupId>io.netty</groupId> + </exclusion> + <exclusion> + <artifactId>netty-codec</artifactId> + <groupId>io.netty</groupId> + </exclusion> + <exclusion> + <artifactId>netty-handler</artifactId> + <groupId>io.netty</groupId> + </exclusion> + <exclusion> + <artifactId>netty-transport</artifactId> + <groupId>io.netty</groupId> + </exclusion> + <exclusion> + <artifactId>slf4j-api</artifactId> + <groupId>org.slf4j</groupId> + </exclusion> + <exclusion> + <artifactId>jnr-ffi</artifactId> + <groupId>com.github.jnr</groupId> + </exclusion> + <exclusion> + <artifactId>jnr-posix</artifactId> + <groupId>com.github.jnr</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.eclipse.jdt</groupId> + <artifactId>ecj</artifactId> + <version>${ecj.version}</version> + </dependency> + <dependency> + <groupId>org.caffinitas.ohc</groupId> + <artifactId>ohc-core</artifactId> + <version>${ohc.version}</version> + <exclusions> + <exclusion> + <artifactId>slf4j-api</artifactId> + <groupId>org.slf4j</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.caffinitas.ohc</groupId> + <artifactId>ohc-core-j8</artifactId> + <version>${ohc.version}</version> + </dependency> + <dependency> + <groupId>net.ju-n.compile-command-annotations</groupId> + <artifactId>compile-command-annotations</artifactId> + <version>1.2.0</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.fusesource</groupId> + <artifactId>sigar</artifactId> + <version>1.6.4</version> + <exclusions> + <exclusion> + <artifactId>log4j</artifactId> + <groupId>log4j</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.carrotsearch</groupId> + <artifactId>hppc</artifactId> + <version>0.8.1</version> + </dependency> + <dependency> + <groupId>de.jflex</groupId> + <artifactId>jflex</artifactId> + <version>${jflex.version}</version> + <exclusions> + <exclusion> + <artifactId>ant</artifactId> + <groupId>org.apache.ant</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>com.googlecode.concurrent-trees</groupId> + <artifactId>concurrent-trees</artifactId> + <version>2.4.0</version> + </dependency> + <dependency> + <groupId>com.github.ben-manes.caffeine</groupId> + <artifactId>caffeine</artifactId> + <version>2.9.2</version> + </dependency> + <dependency> + <groupId>org.jctools</groupId> + <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> + <version>${asm.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-commons</artifactId> + <version>${asm.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-util</artifactId> + <version>${asm.version}</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>sjk-cli</artifactId> + <version>0.14</version> + </dependency> + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>sjk-core</artifactId> + <version>0.14</version> + <exclusions> + <exclusion> + <artifactId>sjk-hflame</artifactId> + <groupId>org.gridkit.jvmtool</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-hflame</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-jfr-standalone</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-nps</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-jfr5</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + <exclusion> + <artifactId>sjk-jfr6</artifactId> + <groupId>org.perfkit.sjk.parsers</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>sjk-stacktrace</artifactId> + <version>0.14</version> + </dependency> + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>mxdump</artifactId> + <version>0.14</version> + </dependency> + <dependency> + <groupId>org.gridkit.lab</groupId> + <artifactId>jvm-attach-api</artifactId> + <version>1.5</version> + </dependency> + <dependency> + <groupId>org.gridkit.jvmtool</groupId> + <artifactId>sjk-json</artifactId> + <version>0.14</version> + </dependency> + <dependency> + <groupId>com.beust</groupId> + <artifactId>jcommander</artifactId> + <version>1.30</version> + </dependency> + <dependency> + <groupId>org.psjava</groupId> + <artifactId>psjava</artifactId> + <version>0.1.19</version> + </dependency> + <dependency> + <groupId>javax.inject</groupId> + <artifactId>javax.inject</artifactId> + <version>1</version> + </dependency> + <dependency> + <groupId>com.google.j2objc</groupId> + <artifactId>j2objc-annotations</artifactId> + <version>1.3</version> + </dependency> + <!-- adding this dependency is necessary for assertj. When updating assertj, need to also update the version of + this that the new assertj's `assertj-parent-pom` depends on. --> + <dependency> + <groupId>org.junit</groupId> + <artifactId>junit-bom</artifactId> + <version>5.9.1</version> + <type>pom</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.24.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.awaitility</groupId> + <artifactId>awaitility</artifactId> + <version>4.0.3</version> + <scope>test</scope> + <exclusions> + <exclusion> + <artifactId>hamcrest</artifactId> + <groupId>org.hamcrest</groupId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest</artifactId> + <version>2.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.github.seancfoley</groupId> + <artifactId>ipaddress</artifactId> + <version>5.3.3</version> + </dependency> + <dependency> + <groupId>org.agrona</groupId> + <artifactId>agrona</artifactId> + <version>1.17.1</version> + </dependency> + <dependency> + <groupId>org.apache.lucene</groupId> + <artifactId>lucene-core</artifactId> + <version>9.7.0</version> + </dependency> + <dependency> + <groupId>org.apache.lucene</groupId> + <artifactId>lucene-analysis-common</artifactId> + <version>9.7.0</version> + </dependency> + <dependency> + <groupId>com.carrotsearch.randomizedtesting</groupId> + <artifactId>randomizedtesting-runner</artifactId> + <version>2.1.2</version> + <scope>test</scope> + <exclusions> + <exclusion> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>ch.obermuhlner</groupId> + <artifactId>big-math</artifactId> + <version>2.3.0</version> + </dependency> + </dependencies> + </dependencyManagement> +</project> diff --cc build.xml index 84272b1368,8d9b8f5516..c77afcb88b --- a/build.xml +++ b/build.xml @@@ -1897,10 -2174,7 +1897,11 @@@ <echo file=".idea/compiler.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="JavacSettings"> - <option name="ADDITIONAL_OPTIONS_STRING" value="--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport=ALL-UNNAMED" /> + <option name="ADDITIONAL_OPTIONS_STRING" value="--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED ++ --add-exports java.rmi/sun.rmi.transport=ALL-UNNAMED + --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED + --add-exports java.base/jdk.internal.ref=ALL-UNNAMED + --add-exports java.base/sun.nio.ch=ALL-UNNAMED" /> </component> </project>]]></echo> </target> diff --cc src/java/org/apache/cassandra/utils/ReflectionUtils.java index bf6ad2c397,07802267f1..289b89beb2 --- a/src/java/org/apache/cassandra/utils/ReflectionUtils.java +++ b/src/java/org/apache/cassandra/utils/ReflectionUtils.java @@@ -20,19 -20,11 +20,22 @@@ package org.apache.cassandra.utils import java.lang.reflect.Field; import java.lang.reflect.Method; + import java.util.Iterator; + import java.util.Map; + import java.util.function.Predicate; -public class ReflectionUtils { +public class ReflectionUtils +{ + private ReflectionUtils() + { + + } + + public static Field getModifiersField() throws NoSuchFieldException + { + return getField(Field.class, "modifiers"); + } + public static Field getField(Class<?> clazz, String fieldName) throws NoSuchFieldException { // below code works before Java 12 @@@ -63,4 -55,44 +66,43 @@@ throw e; } } - } + + /** + * Used by the in-jvm dtest framework to remove entries from private map fields that otherwise would prevent + * collection of classloaders (which causes metaspace OOMs) or otherwise interfere with instance restart. + * @param clazz The class which has the map field to clear + * @param instance an instance of the class to clear (pass null for a static member) + * @param mapName the name of the map field to clear + * @param shouldRemove a predicate which determines if the entry in question should be removed + * @param <K> The type of the map key + * @param <V> The type of the map value + */ + public static <K, V> void clearMapField(Class<?> clazz, Object instance, String mapName, Predicate<Map.Entry<K, V>> shouldRemove) { + try + { + Field mapField = getField(clazz, mapName); + mapField.setAccessible(true); + // noinspection unchecked + Map<K, V> map = (Map<K, V>) mapField.get(instance); + // Because multiple instances can be shutting down at once, + // synchronize on the map to avoid ConcurrentModificationException + synchronized (map) + { + // This could be done with a simple `map.entrySet.removeIf()` call + // but for debugging purposes it is much easier to keep it like this. + Iterator<Map.Entry<K,V>> it = map.entrySet().iterator(); - while (it.hasNext()) - { ++ while (it.hasNext()) { + Map.Entry<K,V> entry = it.next(); + if (shouldRemove.test(entry)) + { + it.remove(); + } + } + } + } + catch (NoSuchFieldException | IllegalAccessException ex) + { + throw new RuntimeException(String.format("Could not clear map field %s in class %s", mapName, clazz), ex); + } + } + } diff --cc test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmx.java index e19e29fdb3,2fd4ec9647..dd53ba4829 --- a/test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmx.java +++ b/test/distributed/org/apache/cassandra/distributed/impl/IsolatedJmx.java @@@ -32,10 -31,12 +31,12 @@@ import javax.management.remote.JMXServi import javax.management.remote.rmi.RMIConnectorServer; import javax.management.remote.rmi.RMIJRMPServerImpl; -import com.google.common.util.concurrent.Uninterruptibles; import org.slf4j.Logger; ++import com.google.common.util.concurrent.Uninterruptibles; import org.apache.cassandra.distributed.api.IInstance; import org.apache.cassandra.distributed.api.IInstanceConfig; + import org.apache.cassandra.distributed.shared.JMXUtil; import org.apache.cassandra.utils.JMXServerUtils; import org.apache.cassandra.utils.MBeanWrapper; import org.apache.cassandra.utils.RMIClientSocketFactoryImpl; diff --cc test/distributed/org/apache/cassandra/distributed/test/ResourceLeakTest.java index 794873feea,7e4581c99c..b90b895662 --- a/test/distributed/org/apache/cassandra/distributed/test/ResourceLeakTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/ResourceLeakTest.java @@@ -70,7 -71,7 +71,7 @@@ public class ResourceLeakTest extends T final boolean dumpEveryLoop = false; // Dump heap & possibly files every loop final boolean dumpFileHandles = false; // Call lsof whenever dumping resources final boolean forceCollection = false; // Whether to explicitly force finalization/gc for smaller heap dumps -- final long finalWaitMillis = 0l; // Number of millis to wait before final resource dump to give gc a chance ++ final long finalWaitMillis = 0L; // Number of millis to wait before final resource dump to give gc a chance static final SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss"); static final String when = format.format(Date.from(now())); diff --cc test/distributed/org/apache/cassandra/distributed/test/jmx/JMXFeatureTest.java index 83a35e594d,a1576d6e36..ea1efa8902 --- a/test/distributed/org/apache/cassandra/distributed/test/jmx/JMXFeatureTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/jmx/JMXFeatureTest.java @@@ -18,9 -18,9 +18,8 @@@ package org.apache.cassandra.distributed.test.jmx; - import java.io.IOException; import java.util.HashSet; import java.util.Set; - import javax.management.MBeanServerConnection; import javax.management.remote.JMXConnector; diff --cc test/distributed/org/apache/cassandra/distributed/test/jmx/JMXGetterCheckTest.java index e7c9776718,8221e039db..5f21c94ab3 --- a/test/distributed/org/apache/cassandra/distributed/test/jmx/JMXGetterCheckTest.java +++ b/test/distributed/org/apache/cassandra/distributed/test/jmx/JMXGetterCheckTest.java @@@ -50,11 -52,13 +52,14 @@@ public class JMXGetterCheckTest extend "org.apache.cassandra.db:type=StorageService:drain", // don't drain, it stops things which can cause other APIs to be unstable as we are in a stopped state "org.apache.cassandra.db:type=StorageService:stopGossiping", // if we stop gossip this can cause other issues, so avoid "org.apache.cassandra.db:type=StorageService:resetLocalSchema", // this will fail when there are no other nodes which can serve schema - "org.apache.cassandra.db:type=CIDRGroupsMappingManager:loadCidrGroupsCache" // AllowAllCIDRAuthorizer doesn't support this operation, as feature is disabled by default + "org.apache.cassandra.db:type=StorageService:joinRing", // Causes bootstrapping errors ++ "org.apache.cassandra.db:type=Tables,keyspace=system,table=local:loadNewSSTables", // Shouldn't attempt to load SSTables as sometimes the temp directories don't work ++ "org.apache.cassandra.db:type=CIDRGroupsMappingManager:loadCidrGroupsCache", // CIDR cache isn't enabled by default + "org.apache.cassandra.db:type=StorageService:clearConnectionHistory", // Throws a NullPointerException + "org.apache.cassandra.db:type=StorageService:startGossiping", // causes multiple loops to fail - "org.apache.cassandra.db:type=StorageService:startNativeTransport", // causes multiple loops to fail - "org.apache.cassandra.db:type=Tables,keyspace=system,table=local:loadNewSSTables" // Shouldn't attempt to load SSTables as sometimes the temp directories don't work ++ "org.apache.cassandra.db:type=StorageService:startNativeTransport" // causes multiple loops to fail ); - public static final String JMX_SERVICE_URL_FMT = "service:jmx:rmi:///jndi/rmi://%s:%d/jmxrmi"; - @Test public void testGetters() throws Exception { diff --cc test/unit/org/apache/cassandra/db/commitlog/CommitLogSegmentManagerCDCTest.java index 5f6f235ece,3789b51714..e964efa2d8 --- a/test/unit/org/apache/cassandra/db/commitlog/CommitLogSegmentManagerCDCTest.java +++ b/test/unit/org/apache/cassandra/db/commitlog/CommitLogSegmentManagerCDCTest.java @@@ -26,8 -26,7 +26,8 @@@ import java.nio.file.Path import java.util.*; import java.util.concurrent.TimeUnit; --import com.google.monitoring.runtime.instrumentation.common.util.concurrent.Uninterruptibles; ++import com.google.common.util.concurrent.Uninterruptibles; +import org.apache.cassandra.ServerTestUtils; import org.apache.cassandra.io.util.File; import org.apache.cassandra.io.util.FileReader; import org.junit.Assert; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org