Changed design of RemoteWatcher due to cleanup race, see #3265
* The problem was a race caused by HeartbeatReq sent out, and the watchee terminated immediately. That caused the RemoteWatcher peers watching each other without any other watch registered. It is racy. * Instead of one-way heartbeats from the side beeing watched I changed to ping-pong style. That makes the problem go away and simplifies a lot of things in RemoteWatcher.
This commit is contained in:
parent
cb6ba83f38
commit
7628889b43
10 changed files with 89 additions and 221 deletions
|
|
@ -26,10 +26,9 @@ private[cluster] object ClusterRemoteWatcher {
|
|||
failureDetector: FailureDetectorRegistry[Address],
|
||||
heartbeatInterval: FiniteDuration,
|
||||
unreachableReaperInterval: FiniteDuration,
|
||||
heartbeatExpectedResponseAfter: FiniteDuration,
|
||||
numberOfEndHeartbeatRequests: Int): Props =
|
||||
heartbeatExpectedResponseAfter: FiniteDuration): Props =
|
||||
Props(classOf[ClusterRemoteWatcher], failureDetector, heartbeatInterval, unreachableReaperInterval,
|
||||
heartbeatExpectedResponseAfter, numberOfEndHeartbeatRequests)
|
||||
heartbeatExpectedResponseAfter)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -47,14 +46,12 @@ private[cluster] class ClusterRemoteWatcher(
|
|||
failureDetector: FailureDetectorRegistry[Address],
|
||||
heartbeatInterval: FiniteDuration,
|
||||
unreachableReaperInterval: FiniteDuration,
|
||||
heartbeatExpectedResponseAfter: FiniteDuration,
|
||||
numberOfEndHeartbeatRequests: Int)
|
||||
heartbeatExpectedResponseAfter: FiniteDuration)
|
||||
extends RemoteWatcher(
|
||||
failureDetector,
|
||||
heartbeatInterval,
|
||||
unreachableReaperInterval,
|
||||
heartbeatExpectedResponseAfter,
|
||||
numberOfEndHeartbeatRequests) {
|
||||
heartbeatExpectedResponseAfter) {
|
||||
|
||||
import RemoteWatcher._
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue