You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2022/07/14 16:43:53 UTC

[cassandra] branch cassandra-4.1 updated (60f742c739 -> 9bd32771e3)

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

maedhroz pushed a change to branch cassandra-4.1
in repository https://gitbox.apache.org/repos/asf/cassandra.git


    from 60f742c739 Followup to CASSANDRA-17530: Fix synchronisation of ClassTransformer, and make compilation deterministic
     new d51f90201b Clean up ScheduledExecutors, CommitLog, and MessagingService shutdown for in-JVM dtests
     new 9bd32771e3 Merge branch 'cassandra-4.0' into cassandra-4.1

The 2 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:
 CHANGES.txt                                                   |  1 +
 .../org/apache/cassandra/distributed/impl/Instance.java       | 11 +++++++----
 .../apache/cassandra/distributed/test/RepairErrorsTest.java   |  4 +---
 3 files changed, 9 insertions(+), 7 deletions(-)


---------------------------------------------------------------------
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-4.0' into cassandra-4.1

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

maedhroz pushed a commit to branch cassandra-4.1
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 9bd32771e3983efdb0b135699a036c91e89b52dd
Merge: 60f742c739 d51f90201b
Author: Caleb Rackliffe <ca...@gmail.com>
AuthorDate: Thu Jul 14 11:26:59 2022 -0500

    Merge branch 'cassandra-4.0' into cassandra-4.1

 CHANGES.txt                                                   |  1 +
 .../org/apache/cassandra/distributed/impl/Instance.java       | 11 +++++++----
 .../apache/cassandra/distributed/test/RepairErrorsTest.java   |  4 +---
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --cc CHANGES.txt
index 7b2a9220d5,20c9b4d560..4b74d85b96
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,17 -1,7 +1,18 @@@
 -4.0.5
 +4.1-alpha2
 + * Remove commons-lang dependency during build runtime (CASSANDRA-17724)
 + * Relax synchronization on StreamSession#onError() to avoid deadlock (CASSANDRA-17706)
 + * Fix AbstractCell#toString throws MarshalException for cell in collection (CASSANDRA-17695)
 + * Add new vtable output option to compactionstats (CASSANDRA-17683)
 + * Fix commitLogUpperBound initialization in AbstractMemtableWithCommitlog (CASSANDRA-17587)
 + * Fix widening to long in getBatchSizeFailThreshold (CASSANDRA-17650)
 + * Fix widening from mebibytes to bytes in IntMebibytesBound (CASSANDRA-17716)
 + * Revert breaking change in nodetool clientstats and expose cient options through nodetool clientstats --client-options. (CASSANDRA-17715)
 + * Fix missed nowInSec values in QueryProcessor (CASSANDRA-17458)
 + * Revert removal of withBufferSizeInMB(int size) in CQLSSTableWriter.Builder class and deprecate it in favor of withBufferSizeInMiB(int size) (CASSANDRA-17675)
 + * Remove expired snapshots of dropped tables after restart (CASSANDRA-17619)
 +Merged from 4.0:
+  * Clean up ScheduledExecutors, CommitLog, and MessagingService shutdown for in-JVM dtests (CASSANDRA-17731)
   * Utilise BTree improvements to reduce garbage and improve throughput (CASSANDRA-15511)
 - * Make sure existing delayed tasks in StreamTransferTask cannot prevent clean shutdown (CASSANDRA-17706)
   * SSL storage port in sstableloader is deprecated (CASSANDRA-17602)
   * Fix counter write timeouts at ONE (CASSANDRA-17411)
   * Fix NPE in getLocalPrimaryRangeForEndpoint (CASSANDRA-17680)
diff --cc test/distributed/org/apache/cassandra/distributed/impl/Instance.java
index 2699ccca0a,3155c063e0..38fd1f8390
--- a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
@@@ -836,47 -782,34 +836,50 @@@ public class Instance extends IsolatedE
                                  () -> SecondaryIndexManager.shutdownAndWait(1L, MINUTES),
                                  () -> IndexSummaryManager.instance.shutdownAndWait(1L, MINUTES),
                                  () -> ColumnFamilyStore.shutdownExecutorsAndWait(1L, MINUTES),
 -                                () -> PendingRangeCalculatorService.instance.shutdownAndWait(1L, MINUTES),
                                  () -> BufferPools.shutdownLocalCleaner(1L, MINUTES),
 +                                () -> PaxosRepair.shutdownAndWait(1L, MINUTES),
                                  () -> Ref.shutdownReferenceReaper(1L, MINUTES),
 -                                () -> Memtable.MEMORY_POOL.shutdownAndWait(1L, MINUTES),
 +                                () -> UncommittedTableData.shutdownAndWait(1L, MINUTES),
 +                                () -> AbstractAllocatorMemtable.MEMORY_POOL.shutdownAndWait(1L, MINUTES),
                                  () -> DiagnosticSnapshotService.instance.shutdownAndWait(1L, MINUTES),
                                  () -> SSTableReader.shutdownBlocking(1L, MINUTES),
 -                                () -> shutdownAndWait(Collections.singletonList(ActiveRepairService.repairCommandExecutor()))
 +                                () -> shutdownAndWait(Collections.singletonList(ActiveRepairService.repairCommandExecutor())),
-                                 () -> ScheduledExecutors.shutdownNowAndWait(1L, MINUTES),
 +                                () -> ActiveRepairService.instance.shutdownNowAndWait(1L, MINUTES),
 +                                () -> SnapshotManager.shutdownAndWait(1L, MINUTES)
              );
  
-             error = parallelRun(error, executor, () -> ScheduledExecutors.shutdownNowAndWait(1L, MINUTES));
- 
              internodeMessagingStarted = false;
              error = parallelRun(error, executor,
-                                 CommitLog.instance::shutdownBlocking,
                                  // can only shutdown message once, so if the test shutsdown an instance, then ignore the failure
 -                                (IgnoreThrowingRunnable) () -> MessagingService.instance().shutdown(1L, MINUTES, false, true)
 +                                (IgnoreThrowingRunnable) () -> MessagingService.instance().shutdown(1L, MINUTES, false, config.has(NETWORK))
              );
 -
              error = parallelRun(error, executor,
 -                                () -> GlobalEventExecutor.INSTANCE.awaitInactivity(1L, MINUTES),
 +                                () -> { if (config.has(NETWORK)) { try { GlobalEventExecutor.INSTANCE.awaitInactivity(1L, MINUTES); } catch (IllegalStateException ignore) {} } },
                                  () -> Stage.shutdownAndWait(1L, MINUTES),
                                  () -> SharedExecutorPool.SHARED.shutdownAndWait(1L, MINUTES)
              );
+ 
+             // CommitLog must shut down after Stage, or threads from the latter may attempt to use the former.
+             // (ex. A Mutation stage thread may attempt to add a mutation to the CommitLog.)
+             error = parallelRun(error, executor, CommitLog.instance::shutdownBlocking);
 -            error = parallelRun(error, executor, () -> shutdownAndWait(Collections.singletonList(JMXBroadcastExecutor.executor)));
 -            
 +            error = parallelRun(error, executor,
 +                                () -> PendingRangeCalculatorService.instance.shutdownAndWait(1L, MINUTES),
 +                                () -> shutdownAndWait(Collections.singletonList(JMXBroadcastExecutor.executor))
 +            );
 +
+             // ScheduledExecutors shuts down after MessagingService, as MessagingService may issue tasks to it.
 -            error = parallelRun(error, executor, () -> ScheduledExecutors.shutdownAndWait(1L, MINUTES));
++            error = parallelRun(error, executor, () -> ScheduledExecutors.shutdownNowAndWait(1L, MINUTES));
++
 +            // Make sure any shutdown hooks registered for DeleteOnExit are released to prevent
 +            // references to the instance class loaders from being held
 +            if (graceful)
 +            {
 +                PathUtils.runOnExitThreadsAndClear();
 +            }
 +            else
 +            {
 +                PathUtils.clearOnExitThreads();
 +            }
  
              Throwables.maybeFail(error);
          }).apply(isolatedExecutor);


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