Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,7 @@ private[akka] class DDataShardCoordinator(

private var terminating = false
private var getShardHomeRequests: Set[(ActorRef, GetShardHome)] = Set.empty
private var initialStateRetries = 0

private val rememberEntitiesStore =
rememberEntitiesStoreProvider.map { provider =>
Expand Down Expand Up @@ -1468,10 +1469,16 @@ private[akka] class DDataShardCoordinator(
onInitialState(existingState, rememberedShards)

case GetFailure(CoordinatorStateKey, _) =>
log.error(
"{}: The ShardCoordinator was unable to get an initial state within 'waiting-for-state-timeout': {} millis (retrying). Has ClusterSharding been started on all nodes?",
typeName,
stateReadConsistency.timeout.toMillis)
initialStateRetries += 1
val template =
"{}: The ShardCoordinator was unable to get an initial state within 'waiting-for-state-timeout': {} millis (retrying). Has ClusterSharding been started on all nodes?"
if (initialStateRetries == 1)
log.info(template, typeName, stateReadConsistency.timeout.toMillis)
else if (initialStateRetries < 5)
log.warning(template, typeName, stateReadConsistency.timeout.toMillis)
else
log.error(template, typeName, stateReadConsistency.timeout.toMillis)

// repeat until GetSuccess
getCoordinatorState()

Expand Down