Merge pull request #1344 from akka/wip-quarantining-in-ClusterRemoteWatcher-patriknw
Quarantine from ClusterRemoteWatcher also, see #2993
This commit is contained in:
commit
c7db89e9ab
2 changed files with 6 additions and 3 deletions
|
|
@ -82,6 +82,7 @@ private[cluster] class ClusterRemoteWatcher(
|
||||||
takeOverResponsibility(m.address)
|
takeOverResponsibility(m.address)
|
||||||
case MemberRemoved(m) ⇒
|
case MemberRemoved(m) ⇒
|
||||||
clusterNodes -= m.address
|
clusterNodes -= m.address
|
||||||
|
quarantine(m.address, m.uniqueAddress.uid)
|
||||||
publishAddressTerminated(m.address)
|
publishAddressTerminated(m.address)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -184,15 +184,17 @@ private[akka] class RemoteWatcher(
|
||||||
watchingNodes foreach { a ⇒
|
watchingNodes foreach { a ⇒
|
||||||
if (!unreachable(a) && !failureDetector.isAvailable(a)) {
|
if (!unreachable(a) && !failureDetector.isAvailable(a)) {
|
||||||
log.warning("Detected unreachable: [{}]", a)
|
log.warning("Detected unreachable: [{}]", a)
|
||||||
|
addressUids.get(a) foreach { uid ⇒ quarantine(a, uid) }
|
||||||
publishAddressTerminated(a)
|
publishAddressTerminated(a)
|
||||||
unreachable += a
|
unreachable += a
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def publishAddressTerminated(address: Address): Unit = {
|
def publishAddressTerminated(address: Address): Unit =
|
||||||
addressUids.get(address) foreach { uid ⇒ remoteProvider.quarantine(address, uid) }
|
|
||||||
context.system.eventStream.publish(AddressTerminated(address))
|
context.system.eventStream.publish(AddressTerminated(address))
|
||||||
}
|
|
||||||
|
def quarantine(address: Address, uid: Int): Unit =
|
||||||
|
remoteProvider.quarantine(address, uid)
|
||||||
|
|
||||||
def watchRemote(watchee: ActorRef, watcher: ActorRef): Unit =
|
def watchRemote(watchee: ActorRef, watcher: ActorRef): Unit =
|
||||||
if (watchee.path.uid == akka.actor.ActorCell.undefinedUid)
|
if (watchee.path.uid == akka.actor.ActorCell.undefinedUid)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue