smiklosovic commented on code in PR #2842:
URL: https://github.com/apache/cassandra/pull/2842#discussion_r1440320120
##########
src/java/org/apache/cassandra/service/StartupChecks.java:
##########
@@ -417,14 +417,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;
- SigarLibrary.instance.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())
+ logger.warn(message);
+ else
+ logger.info(message);
+ }
+ else
+ logger.info("Checked OS settings and found them configured for
optimal performance.");
Review Comment:
@michaelsembwever I see same log here
https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/utils/SigarLibrary.java#L179
If we are all good, we just print this, as it was before.
On the other hand, I am not sure what is the logic behind if / else above
and logging on `warn` or `info` level depending on what is
`TEST_IGNORE_PROCESS_ENVIRONMENT_CHECK` set to. That seems to be just
unnecessary distinction here. I would say that we should always log it on
`warn`.
--
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]