Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/sharding debug logs #1

Open
wants to merge 2 commits into
base: release-2.5
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -361,6 +361,7 @@ private[akka] class Shard(

if (state.entities.nonEmpty) {
val entityHandOffTimeout = (settings.tuningParameters.handOffTimeout - 5.seconds).max(1.seconds)
log.debug("Starting HandOffStopper for shard {} to terminate following entities: {}", shardId, idByRef.keySet)
handOffStopper = Some(
context.watch(context.actorOf(
handOffStopperProps(shardId, replyTo, idByRef.keySet, handOffStopMessage, entityHandOffTimeout))))
@@ -397,18 +397,26 @@ object ShardRegion {
def receive = {
case ReceiveTimeout =>
log.warning(
"HandOffStopMessage[{}] is not handled by some of the entities of the `{}` shard, " +
"stopping the remaining entities.",
"HandOffStopMessage[{}] is not handled by some of the entities of the `{}` shard after {}, " +
"stopping the remaining entities: {}",
stopMessage.getClass.getName,
shard)
shard,
handoffTimeout,
remaining)

remaining.foreach { ref =>
context.stop(ref)
}

case Terminated(ref) =>
remaining -= ref
log.debug(
"HandOffStopper of the `{}` shard received Terminated message for the ActorRef {}, the remaining entities: {}",
shard,
ref,
remaining)
if (remaining.isEmpty) {
log.debug("HandOffStopper remaining entities are empty, sending ShardStopped message for shard {}", shard)
replyTo ! ShardStopped(shard)
context.stop(self)
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.