Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Normal
Description
In StorageService.java there is a variable accessed from other threads that is not marked volatile.
private boolean inShutdownHook = false; public boolean isInShutdownHook() { return inShutdownHook; } drainOnShutdown = new Thread(new WrappedRunnable() { @Override public void runMayThrow() throws InterruptedException { inShutdownHook = true;
This is called from at least here:
./src/java/org/apache/cassandra/concurrent/DebuggableScheduledThreadPoolExecutor.java: if (!StorageService.instance.isInShutdownHook())
This could cause issues in controlled shutdown like drain commands.