You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by if...@apache.org on 2019/02/25 13:23:08 UTC

[cassandra] branch trunk updated (0e7820f -> 5c4c75c)

This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


    from 0e7820f  Merge branch 'cassandra-3.11' into trunk
     new a7d8ba7  Fix memory-retention problem arising from thread locals from schema change in in-jvm tests
     new b27cc37  Merge branch 'cassandra-2.2' into cassandra-3.0
     new 7b462ec  Merge branch 'cassandra-3.0' into cassandra-3.11
     new 5c4c75c  Merge branch 'cassandra-3.11' into trunk

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .circleci/config.yml                               | 11 +--
 build.xml                                          | 63 +++++++++++----
 .../cassandra/distributed/api/IInstance.java       |  3 +-
 .../distributed/api/IIsolatedExecutor.java         |  3 +-
 .../distributed/impl/AbstractCluster.java          | 30 ++++---
 .../impl/DelegatingInvokableInstance.java          |  4 +-
 .../cassandra/distributed/impl/Instance.java       | 18 ++---
 .../distributed/impl/IsolatedExecutor.java         | 27 ++++++-
 .../distributed/test/DistributedTestBase.java      |  9 +++
 .../cassandra/distributed/test/TestLocator.java    | 93 ++++++++++++++++++++++
 10 files changed, 211 insertions(+), 50 deletions(-)
 create mode 100644 test/distributed/org/apache/cassandra/distributed/test/TestLocator.java


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra] 01/01: Merge branch 'cassandra-3.11' into trunk

Posted by if...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 5c4c75cac70dfb885a9905b7fc33a910f83ac989
Merge: 0e7820f 7b462ec
Author: Alex Petrov <ol...@gmail.com>
AuthorDate: Mon Feb 25 14:20:03 2019 +0100

    Merge branch 'cassandra-3.11' into trunk

 .circleci/config.yml                               | 11 +--
 build.xml                                          | 63 +++++++++++----
 .../cassandra/distributed/api/IInstance.java       |  3 +-
 .../distributed/api/IIsolatedExecutor.java         |  3 +-
 .../distributed/impl/AbstractCluster.java          | 30 ++++---
 .../impl/DelegatingInvokableInstance.java          |  4 +-
 .../cassandra/distributed/impl/Instance.java       | 18 ++---
 .../distributed/impl/IsolatedExecutor.java         | 27 ++++++-
 .../distributed/test/DistributedTestBase.java      |  9 +++
 .../cassandra/distributed/test/TestLocator.java    | 93 ++++++++++++++++++++++
 10 files changed, 211 insertions(+), 50 deletions(-)

diff --cc build.xml
index efcc9a9,5c5385c..7ada775
--- a/build.xml
+++ b/build.xml
@@@ -1317,6 -1269,6 +1309,8 @@@
               more aggressively rather than waiting. See CASSANDRA-14922 for more details.
          -->
          <jvmarg value="-XX:MaxMetaspaceSize=256M" />
++        <jvmarg value="-XX:MetaspaceSize=128M" />
++        <jvmarg value="-XX:MaxMetaspaceExpansion=64M" />
          <jvmarg value="-XX:SoftRefLRUPolicyMSPerMB=0" />
          <jvmarg value="-Dcassandra.memtable_row_overhead_computation_step=100"/>
          <jvmarg value="-Dcassandra.test.use_prepared=${cassandra.test.use_prepared}"/>
@@@ -1452,9 -1401,10 +1446,9 @@@
    -->
    <target name="testsome" depends="build-test" description="Execute specific unit tests" >
      <testmacro inputdir="${test.unit.src}" timeout="${test.timeout}">
-       <test name="${test.name}" methods="${test.methods}"/>
+       <test name="${test.name}" methods="${test.methods}" outfile="build/test/output/TEST-${test.name}-${test.methods}"/>
        <jvmarg value="-Dlegacy-sstable-root=${test.data}/legacy-sstables"/>
        <jvmarg value="-Dinvalid-legacy-sstable-root=${test.data}/invalid-legacy-sstables"/>
 -      <jvmarg value="-Dmigration-sstable-root=${test.data}/migration-sstables"/>
        <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
        <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
        <jvmarg value="-Dcassandra.skip_sync=true" />
@@@ -1872,7 -1814,47 +1867,47 @@@
      <testparallel testdelegate="testlist"/>
    </target>
  
-     <!-- run microbenchmarks suite -->
+   <!-- In-JVM dtest targets -->
+   <target name="list-jvm-dtests" depends="build-test">
+     <java classname="org.apache.cassandra.distributed.test.TestLocator" fork="no">
+           <classpath>
 -              <path refid="cassandra.classpath" />
++              <path refid="cassandra.classpath.test" />
+               <pathelement location="${test.classes}"/>
+               <pathelement location="${test.conf}"/>
+               <fileset dir="${test.lib}">
+                   <include name="**/*.jar" />
+               </fileset>
+           </classpath>
+         <arg value="${test.distributed.listfile}"/>
+     </java>
+   </target>
+ 
+   <target name="test-jvm-dtest-forking" depends="list-jvm-dtests" description="Execute In-JVM 'distributed' tests" >
+     <chmod file="${test.distributed.listfile}" perm="+x"/>
+     <exec executable="./${test.distributed.listfile}" failonerror="true"/>
+     <delete file="${test.distributed.listfile}"/>
+   </target>
+ 
+   <target name="dtest-jar" depends="build-test, build" description="Create dtest-compatible jar, including all dependencies">
+       <jar jarfile="${build.dir}/dtest-${base.version}.jar">
+           <zipgroupfileset dir="${build.lib}" includes="*.jar" excludes="META-INF/*.SF"/>
+           <fileset dir="${build.classes.main}"/>
+           <fileset dir="${test.classes}"/>
+           <fileset dir="${test.conf}" />
+       </jar>
+   </target>
+ 
+   <target name="test-jvm-dtest" depends="build-test" description="Execute unit tests">
+     <testmacro inputdir="${test.distributed.src}" timeout="${test.distributed.timeout}" forkmode="once" showoutput="true" filter="**/test/*Test.java">
+       <jvmarg value="-Dlogback.configurationFile=test/conf/logback-dtest.xml"/>
+       <jvmarg value="-Dcassandra.ring_delay_ms=1000"/>
+       <jvmarg value="-Dcassandra.tolerate_sstable_size=true"/>
+       <jvmarg value="-Djava.io.tmpdir=${tmp.dir}"/>
+       <jvmarg value="-Dcassandra.skip_sync=true" />
+     </testmacro>
+   </target>
+ 
+   <!-- run microbenchmarks suite -->
    <target name="microbench" depends="build-jmh">
        <java classname="org.openjdk.jmh.Main"
              fork="true"
diff --cc test/distributed/org/apache/cassandra/distributed/impl/Instance.java
index e5f5c7f,72540b0..038ae8a
--- a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
@@@ -20,14 -20,19 +20,15 @@@ package org.apache.cassandra.distribute
  
  import java.io.File;
  import java.io.IOException;
 -import java.net.InetAddress;
  import java.util.ArrayList;
  import java.util.Collections;
 -import java.util.HashMap;
  import java.util.List;
 -import java.util.Map;
  import java.util.UUID;
+ import java.util.concurrent.CompletableFuture;
 -import java.util.concurrent.ExecutionException;
  import java.util.concurrent.ExecutorService;
  import java.util.concurrent.Future;
 +import java.util.concurrent.TimeUnit;
  import java.util.function.BiConsumer;
 -import java.util.function.Function;
  
  import org.slf4j.LoggerFactory;
  
@@@ -354,10 -361,9 +354,10 @@@ public class Instance extends IsolatedE
          }
      }
  
 +    @Override
-     public void shutdown()
+     public Future<Void> shutdown()
      {
-         sync((ExecutorService executor) -> {
+         Future<?> future = async((ExecutorService executor) -> {
              Throwable error = null;
              error = parallelRun(error, executor,
                      Gossiper.instance::stop,
@@@ -385,27 -390,16 +385,30 @@@
                                  StageManager::shutdownAndWait,
                                  SharedExecutorPool.SHARED::shutdown
              );
+ 
              LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
              loggerContext.stop();
-             super.shutdown();
              Throwables.maybeFail(error);
-         }).accept(isolatedExecutor);
+         }).apply(isolatedExecutor);
+ 
+         return CompletableFuture.runAsync(ThrowingRunnable.toRunnable(future::get), isolatedExecutor)
+                                 .thenRun(super::shutdown);
      }
  
 +    private static void shutdownAndWait(ExecutorService executor)
 +    {
 +        try
 +        {
 +            executor.shutdownNow();
 +            executor.awaitTermination(20, TimeUnit.SECONDS);
 +        }
 +        catch (InterruptedException e)
 +        {
 +            throw new RuntimeException(e);
 +        }
 +        assert executor.isTerminated() && executor.isShutdown() : executor;
 +    }
 +
      private static Throwable parallelRun(Throwable accumulate, ExecutorService runOn, ThrowingRunnable ... runnables)
      {
          List<Future<Throwable>> results = new ArrayList<>();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org