You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2020/07/18 00:57:04 UTC

[GitHub] [cassandra] dcapwell commented on a change in pull request #684: CASSANDRA-15191 - stop gossip and transport on stop_paranoid disk failure policy

dcapwell commented on a change in pull request #684:
URL: https://github.com/apache/cassandra/pull/684#discussion_r456728756



##########
File path: test/distributed/org/apache/cassandra/distributed/test/JVMStabilityInspectorCorruptSSTableExceptionTest.java
##########
@@ -0,0 +1,105 @@
+/*
+ * 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.
+ */
+
+package org.apache.cassandra.distributed.test;
+
+import org.junit.Test;
+
+import org.apache.cassandra.config.Config.DiskFailurePolicy;
+import org.apache.cassandra.distributed.Cluster;
+import org.apache.cassandra.distributed.api.IInvokableInstance;
+import org.apache.cassandra.distributed.api.IIsolatedExecutor.SerializableCallable;
+import org.apache.cassandra.distributed.shared.AbstractBuilder;
+import org.apache.cassandra.distributed.shared.NetworkTopology;
+import org.apache.cassandra.gms.Gossiper;
+import org.apache.cassandra.io.sstable.CorruptSSTableException;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.cassandra.service.DefaultFSErrorHandler;
+import org.apache.cassandra.service.StorageService;
+import org.apache.cassandra.utils.JVMStabilityInspector;
+
+import static org.apache.cassandra.distributed.api.Feature.GOSSIP;
+import static org.apache.cassandra.distributed.api.Feature.NATIVE_PROTOCOL;
+import static org.apache.cassandra.distributed.api.Feature.NETWORK;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+public class JVMStabilityInspectorCorruptSSTableExceptionTest extends TestBaseImpl

Review comment:
       These tests don't replicate the bad logic reported in JIRA.  I took these tests and slightly modified them to not throw but update the thread error handler and both passed.  
   
   Can we update the tests to replicate the behavior reported?  Since the tests call `JVMStabilityInspector` directly they don't actually match the change made to AbstractLocalAwareExecutorService

##########
File path: src/java/org/apache/cassandra/service/CassandraDaemon.java
##########
@@ -463,14 +463,12 @@ public static void uncaughtException(Thread t, Throwable e)
             {
                 if (e2 != e) // make sure FSError gets logged exactly once.
                     logger.error("Exception in thread " + t, e2);
-                FileUtils.handleFSError((FSError) e2);

Review comment:
       since this is now handled by `JVMStabilityInspector.inspectThrowable` the logging should also be handled there.  Also, inspect is recursive so we don't need to walk the cause change anymore




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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