smiklosovic commented on code in PR #1351: URL: https://github.com/apache/cassandra/pull/1351#discussion_r853316350
########## src/java/org/apache/cassandra/service/StartupCheck.java: ########## @@ -43,16 +43,25 @@ * * @param startupChecksOptions all options from descriptor * @throws org.apache.cassandra.exceptions.StartupException if the test determines - * that the environement or system is not in a safe state to startup + * that the environement or system is not in a safe state to startup */ void execute(StartupChecksOptions startupChecksOptions) throws StartupException; /** - * * @return type of this startup check for configuration retrieval */ default StartupCheckType getStartupCheckType() { return StartupCheckType.non_configurable_check; } + + /** + * Executes abritrary logic only after all startup checks are passed. + * + * These methods, per check, will be executed in the same order as checks were. + * + * @param startupChecksOptions all options from descriptor + * @throws StartupException exception thrown in case post-check task is errorneous + */ + default void executePostCheckTask(StartupChecksOptions startupChecksOptions) throws StartupException {} Review Comment: @driftx Ok hear me out here to build the case for that. Right now, we have startup checks which are executed one after the other. Once all startup checks passed, we are good to go. Currently, this new check is introduced as the last one. However, that does not need to be the case as there might be more checks added in the future. Once we place new check after this to be executed as the last one, that last check might fail. However, we already started to persist heartbeats into the heartbeat file. So on one hand we failed to start the node because the last check has failed, on the other hand we already started to heartbeat. By doing this, I will start to heartbeat when I am absolutely sure all checks have passed. -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org