DomGarguilo commented on code in PR #5953:
URL: https://github.com/apache/accumulo/pull/5953#discussion_r3639696039
##########
core/src/main/java/org/apache/accumulo/core/fate/Fate.java:
##########
@@ -400,6 +419,11 @@ public void shutdown(long timeout, TimeUnit timeUnit) {
TimeUnit.SECONDS.convert(timeout, timeUnit));
// important this is set before shutdownNow is called as the background
// threads will check this to see if shutdown related errors should be
ignored.
+ if (!started.get()) {
+ log.info("{} FATE not started, nothing to shutdown", store.type());
+ return;
+ }
Review Comment:
```suggestion
if (started.compareAndSet(false, true)) {
log.info("{} FATE was not started before shutdown", store.type());
}
```
I think setting started during shutdown will make sure we can't call start()
after shutdown(), even if shutdown() happens before the first start().
--
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]