Better warning message on cluster sharding registration (#24906)
* Better warning message on cluster sharding registration (#24295) * Extra useful message * Add [] in the log messages around membersByAge.head
This commit is contained in:
parent
8c4181e552
commit
989a80d90f
1 changed files with 13 additions and 4 deletions
|
|
@ -673,10 +673,19 @@ private[akka] class ShardRegion(
|
|||
|
||||
def register(): Unit = {
|
||||
coordinatorSelection.foreach(_ ! registrationMessage)
|
||||
if (shardBuffers.nonEmpty && retryCount >= 5)
|
||||
log.warning(
|
||||
"Trying to register to coordinator at [{}], but no acknowledgement. Total [{}] buffered messages.",
|
||||
coordinatorSelection, shardBuffers.totalSize)
|
||||
if (shardBuffers.nonEmpty && retryCount >= 5) coordinatorSelection match {
|
||||
case Some(actorSelection) ⇒
|
||||
val coordinatorMessage =
|
||||
if (cluster.state.unreachable(membersByAge.head)) s"Coordinator [${membersByAge.head}] is unreachable."
|
||||
else s"Coordinator [${membersByAge.head}] is reachable."
|
||||
log.warning(
|
||||
"Trying to register to coordinator at [{}], but no acknowledgement. Total [{}] buffered messages. [{}]",
|
||||
actorSelection, shardBuffers.totalSize, coordinatorMessage
|
||||
)
|
||||
case None ⇒ log.warning(
|
||||
"No coordinator found to register. Probably, no seed-nodes configured and manual cluster join not performed? Total [{}] buffered messages.",
|
||||
shardBuffers.totalSize)
|
||||
}
|
||||
}
|
||||
|
||||
def registrationMessage: Any =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue