Warn if handOffStopMessage not handled (#25648)

* Stops entities of shard forcefully if they don't handle stopMessage #23751

* Prints a warning log while stopping the entities

* fix version of backward exclude file and checks for shard stopped

* adds documentation for handoff timeout
This commit is contained in:
Saleh Khazaei 2018-12-04 20:50:58 +03:30 committed by Patrik Nordwall
parent af38a1eefd
commit c383f4483b
5 changed files with 64 additions and 9 deletions

View file

@ -16,7 +16,7 @@ import akka.actor.Actor
import akka.util.MessageBufferMap
import scala.concurrent.Future
import scala.concurrent.duration.FiniteDuration
import scala.concurrent.duration._
import akka.cluster.Cluster
import akka.cluster.ddata.ORSet
import akka.cluster.ddata.ORSetKey
@ -233,8 +233,9 @@ private[akka] class Shard(
log.debug("HandOff shard [{}]", shardId)
if (state.entities.nonEmpty) {
val entityHandOffTimeout = (settings.tuningParameters.handOffTimeout - 5.seconds).max(1.seconds)
handOffStopper = Some(context.watch(context.actorOf(
handOffStopperProps(shardId, replyTo, idByRef.keySet, handOffStopMessage))))
handOffStopperProps(shardId, replyTo, idByRef.keySet, handOffStopMessage, entityHandOffTimeout))))
//During hand off we only care about watching for termination of the hand off stopper
context become {