smiklosovic commented on code in PR #2842:
URL: https://github.com/apache/cassandra/pull/2842#discussion_r1440373286
##########
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:
@jacek-lewandowski
I think that make this a startup check is just fine for now. Let's just
rewrite the guts of it for now ... There is as lot of startup checks which are
not stopping node from starting. For example `checkReadAheadKbSetting` just (at
most) logs warnings ... so based on that logic, that one does not qualify for
being a startup check either. Similar to `checkLz4Native` etc ...
I think for now this is just fine. We could then probably consolidate these
checks so they indeed stop the bootstrap if they fail and we could extract the
rest to some other logic. I think that we are dealing primarily with "how
things were".
--
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]