Claudenw commented on code in PR #2842:
URL: https://github.com/apache/cassandra/pull/2842#discussion_r1375799996


##########
src/java/org/apache/cassandra/service/StartupChecks.java:
##########
@@ -357,14 +357,26 @@ public void execute(StartupChecksOptions options) throws 
StartupException
         }
     };
 
-    public static final StartupCheck initSigarLibrary = new StartupCheck()
+    public static final StartupCheck checkProcessEnvironment = new 
StartupCheck()
     {
         @Override
         public void execute(StartupChecksOptions options)
         {
             if (options.isDisabled(getStartupCheckType()))
                 return;
-            new SystemInfo().warnIfRunningInDegradedMode();
+
+            Optional<String> degradations = new SystemInfo().isDegraded();
+
+            if (degradations.isPresent())
+            {
+                String message = "Cassandra server running in degraded mode. " 
+ degradations.get();
+                if 
(CassandraRelevantProperties.TEST_IGNORE_PROCESS_ENVIRONMENT_CHECK.getBoolean() 
|| 
CassandraRelevantProperties.TEST_IGNORE_PROCESS_ENVIRONMENT_CHECK.getBoolean())

Review Comment:
   The more I look at this the more I think it is wrong.  The original code 
logged a warning if the system was running in degraded mode OR the flag was 
set.  Since the flag is only set in a test I think that perhaps we could remove 
the flag all together.    I will explore this today and see if there is 
something more reasonable to do here.  But this solution is incorrect as it 
will not log anything if there is no degradation and the flag is set.



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