Merge pull request #1344 from akka/wip-quarantining-in-ClusterRemoteWatcher-patriknw

Quarantine from ClusterRemoteWatcher also, see #2993
This commit is contained in:
Patrik Nordwall 2013-04-18 13:05:06 -07:00
commit c7db89e9ab
2 changed files with 6 additions and 3 deletions

View file

@ -82,6 +82,7 @@ private[cluster] class ClusterRemoteWatcher(
takeOverResponsibility(m.address)
case MemberRemoved(m)
clusterNodes -= m.address
quarantine(m.address, m.uniqueAddress.uid)
publishAddressTerminated(m.address)
}

View file

@ -184,15 +184,17 @@ private[akka] class RemoteWatcher(
watchingNodes foreach { a
if (!unreachable(a) && !failureDetector.isAvailable(a)) {
log.warning("Detected unreachable: [{}]", a)
addressUids.get(a) foreach { uid quarantine(a, uid) }
publishAddressTerminated(a)
unreachable += a
}
}
def publishAddressTerminated(address: Address): Unit = {
addressUids.get(address) foreach { uid remoteProvider.quarantine(address, uid) }
def publishAddressTerminated(address: Address): Unit =
context.system.eventStream.publish(AddressTerminated(address))
}
def quarantine(address: Address, uid: Int): Unit =
remoteProvider.quarantine(address, uid)
def watchRemote(watchee: ActorRef, watcher: ActorRef): Unit =
if (watchee.path.uid == akka.actor.ActorCell.undefinedUid)