How can I re-start actor immediately from downed node?

I’m using Cluster sharding with 2 nodes.

I faced some timing issue when I test scale-in.
I’ve been used to call cluster.leave method to reduce number of node.
After node instance is terminated,
I expected the actor to be re-started on the live node even that was in dead node.

That was good as I expected.

But It takes too long time to re-start actor. It takes around 6 sec.
I got this log too.

The ShardCoordinator was unable to get an initial state within ‘waiting-for-state-timeout’: 5000 millis (retrying). Has ClusterSharding been started on all nodes

How can I re-start this actor immediately?

What downing do you use to remove the shutdown node from the cluster membership? Is it possible that this is not properly removing the node from the cluster?

If you can run with akka.loglevel=DEBUG and share those logs we would get more insights to what is going on inside Cluster Sharding

I exposed API to call cluster.leave method.
I manually call this API before terminate instance.

I tried to find new DEBUG log but I cannot find some strange thing.
I got only shardRegion log before actor start.
It looks shardRegion try to allocate shard to actor.

I added more logs from alive node.
cluster.leave() in 10.26.30.95 was called at 02:23:49.815

Is it possible to reduce updating-state-timeout for DDataShardCoordinator?

timestamp=02:23:52.241, level=DEBUG, logger=TcpOutgoingConnection, tn=my-akka.actor.default-dispatcher-8, message=Resolving 10.26.30.95 before connecting,

timestamp=02:23:52.241, level=DEBUG, logger=TcpOutgoingConnection, tn=my-akka.actor.default-dispatcher-15, message=Attempting connection to [/10.26.30.95:2552],

timestamp=02:23:52.243, level=DEBUG, logger=TcpOutgoingConnection, tn=my-akka.actor.default-dispatcher-15, message=Could not establish connection to [10.26.30.95:2552] due to java.net.ConnectException: Connection refused,

timestamp=02:23:52.247, level=DEBUG, logger=RestartWithBackoffFlow, tn=my-akka.actor.default-dispatcher-8, message=Restarting graph in 2011261634 nanoseconds,

timestamp=02:23:56.169, level=ERROR, logger=DDataShardCoordinator, tn=my-akka.actor.default-dispatcher-3, message=The ShardCoordinator was unable to update a distributed state within ‘updating-state-timeout’: 5000 millis (retrying). Perhaps the S
hardRegion has not started on all active nodes yet? event=ShardHomeDeallocated(99),