Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4.1
-
None
Description
ClusterNode has a stopDelay that defaults to zero. This is problematic because it's used in joining syncThread. SyncThread is supposed to be a daemon thread which means it's not supposed to block JVM shutdown. However, by joining syncThread with a default stopDelay of zero, ClusterNode can potentially wait for syncThread to finish its job forever. This effectively makes syncThread a non-daemon thread and that can definitely make ClusterNode#stop block forever if syncThread never finishes.
Instead of defaulting to zero, I think it'd be better if stopDelay defaulted to something more reasonable like 2 * syncDelay. There's no need to make ClusterNode block forever for sync in any case.