in management-cluster-bootstrap/src/main/scala/org/apache/pekko/management/cluster/bootstrap/internal/BootstrapCoordinator.scala [376:405]
private def decide(): Unit = {
if (decisionInProgress)
log.debug("Previous decision still in progress")
else {
lastContactsObservation.foreach { contacts =>
val currentTime = timeNow()
// filter out old observations, in case the probing failures are not triggered
def isObsolete(obs: SeedNodesObservation): Boolean =
java.time.Duration
.between(obs.observedAt, currentTime)
.toMillis > settings.contactPoint.probingFailureTimeout.toMillis
val seedObservations = seedNodesObservations.valuesIterator.filterNot(isObsolete).toSet
val info =
new SeedNodesInformation(currentTime, contacts.observedAt, contacts.observedContactPoints, seedObservations)
decisionInProgress = true
joinDecider
.decide(info)
.recover {
case e =>
log.error(e, "Join decision failed: {}", e)
KeepProbing
}
.foreach(self ! _)
}
}
}