maedhroz commented on a change in pull request #1301:
URL: https://github.com/apache/cassandra/pull/1301#discussion_r796255662



##########
File path: src/java/org/apache/cassandra/utils/JVMStabilityInspector.java
##########
@@ -140,15 +140,26 @@ else if (t instanceof UnrecoverableIllegalStateException)
             if (t instanceof FSError || t instanceof CorruptSSTableException)
                 isUnstable = true;
 
-        fn.accept(t);
-
         // Check for file handle exhaustion
         if (t instanceof FileNotFoundException || t instanceof 
FileSystemException || t instanceof SocketException)
             if (t.getMessage() != null && t.getMessage().contains("Too many 
open files"))
                 isUnstable = true;
 
         if (isUnstable)
+        {
+            if (!StorageService.instance.isDaemonSetupCompleted())
+                FileUtils.handleStartupFSError(t);
             killer.killCurrentJVM(t);

Review comment:
       So if `isUnstable == true`, we're going to kill the JVM no matter what, 
but is the point of calling `handleStartupFSError()` that we log a better 
message when, in fact, we're not done with daemon setup? (It seems like both of 
the possible consumers call it as well when the setup isn't done, so this at 
least preserves the existing behavior through the reordering of this block w/ 
the `accept()` call...)




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to