From 056d6a8a8b627c69191daf8681fd98bc902366d8 Mon Sep 17 00:00:00 2001 From: kvpetrov Date: Tue, 30 Jul 2024 15:45:31 -0700 Subject: [PATCH] fixing shard level failover for cases when shard is unassigned for long periods of time (#1820) Co-authored-by: Kier Petrov --- .../queryplanner/HighAvailabilityPlanner.scala | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coordinator/src/main/scala/filodb.coordinator/queryplanner/HighAvailabilityPlanner.scala b/coordinator/src/main/scala/filodb.coordinator/queryplanner/HighAvailabilityPlanner.scala index 89fb6b82f..2ec7334c1 100644 --- a/coordinator/src/main/scala/filodb.coordinator/queryplanner/HighAvailabilityPlanner.scala +++ b/coordinator/src/main/scala/filodb.coordinator/queryplanner/HighAvailabilityPlanner.scala @@ -371,7 +371,12 @@ class HighAvailabilityPlanner(dsRef: DatasetRef, } else { false } - val path = shardMapper.coordForShard(i).path.toString + val actorRef = shardMapper.coordForShard(i) + val path = if (actorRef == akka.actor.ActorRef.noSender) { + "" + } else { + actorRef.path.toString + } shardInfoArray(i) = filodb.core.query.ShardInfo(isActive, path) } val localActiveShardMapper = ActiveShardMapper(shardInfoArray)