You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sm...@apache.org on 2022/10/20 10:58:02 UTC

[cassandra] branch trunk updated: Call only LoggingSupportFactory in Instance instead ThreadAwareSecurityManager to fix SSTableIdGenerationTest

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

smiklosovic 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 ac68f24512 Call only LoggingSupportFactory in Instance instead ThreadAwareSecurityManager to fix SSTableIdGenerationTest
ac68f24512 is described below

commit ac68f24512dc123a197cf49e9116afcfa3f786f9
Author: Stefan Miklosovic <sm...@apache.org>
AuthorDate: Wed Oct 19 21:54:37 2022 +0200

    Call only LoggingSupportFactory in Instance instead ThreadAwareSecurityManager to fix SSTableIdGenerationTest
    
    This relates especially to CASSANDRA-17948.
    In CassandraDaemon, this is called via ThreadAwareSecurityManager.install()
    but we do not need that whole body of the method to be executed because it
    also installs SecurityManager which would clash with SecurityManager
    SSTableIdGenerationTest installs in beforeClass method so
    it would fail testRestartWithUUIDDisabled.
    
    patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-17975
---
 test/distributed/org/apache/cassandra/distributed/impl/Instance.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
index cba3807237..e31c37cdbf 100644
--- a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
@@ -114,7 +114,6 @@ import org.apache.cassandra.net.Verb;
 import org.apache.cassandra.schema.MigrationCoordinator;
 import org.apache.cassandra.schema.Schema;
 import org.apache.cassandra.schema.SchemaConstants;
-import org.apache.cassandra.security.ThreadAwareSecurityManager;
 import org.apache.cassandra.service.ActiveRepairService;
 import org.apache.cassandra.service.CassandraDaemon;
 import org.apache.cassandra.service.ClientState;
@@ -147,6 +146,7 @@ import org.apache.cassandra.utils.FBUtilities;
 import org.apache.cassandra.utils.JVMStabilityInspector;
 import org.apache.cassandra.utils.Throwables;
 import org.apache.cassandra.utils.concurrent.Ref;
+import org.apache.cassandra.utils.logging.LoggingSupportFactory;
 import org.apache.cassandra.utils.memory.BufferPools;
 import org.apache.cassandra.utils.progress.jmx.JMXBroadcastExecutor;
 
@@ -591,7 +591,8 @@ public class Instance extends IsolatedExecutor implements IInvokableInstance
                 DistributedTestSnitch.assign(config.networkTopology());
 
                 DatabaseDescriptor.daemonInitialization();
-                ThreadAwareSecurityManager.install();
+                LoggingSupportFactory.getLoggingSupport().onStartup();
+
                 FileUtils.setFSErrorHandler(new DefaultFSErrorHandler());
                 DatabaseDescriptor.createAllDirectories();
                 CassandraDaemon.getInstanceForTesting().migrateSystemDataIfNeeded();


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