From 4e52432706f0460c477142ce185ec8b2c4b5dec8 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 26 Jun 2019 15:47:15 +0100 Subject: [PATCH] Rolling update when adding akka-cluster-typed dependency, #27191 (#27210) --- .../ClusterReceptionistConfigCompatChecker.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionistConfigCompatChecker.scala b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionistConfigCompatChecker.scala index f9b7b317e6..3742458398 100644 --- a/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionistConfigCompatChecker.scala +++ b/akka-cluster-typed/src/main/scala/akka/cluster/typed/internal/receptionist/ClusterReceptionistConfigCompatChecker.scala @@ -5,7 +5,7 @@ package akka.cluster.typed.internal.receptionist import akka.annotation.InternalApi -import akka.cluster.{ ConfigValidation, JoinConfigCompatChecker } +import akka.cluster.{ ConfigValidation, JoinConfigCompatChecker, Valid } import com.typesafe.config.Config /** @@ -19,5 +19,8 @@ final class ClusterReceptionistConfigCompatChecker extends JoinConfigCompatCheck override def requiredKeys = "akka.cluster.typed.receptionist.distributed-key-count" :: Nil override def check(toCheck: Config, actualConfig: Config): ConfigValidation = - JoinConfigCompatChecker.fullMatch(requiredKeys, toCheck, actualConfig) + if (toCheck.hasPath(requiredKeys.head)) + JoinConfigCompatChecker.fullMatch(requiredKeys, toCheck, actualConfig) + else + Valid // support for rolling update, property doesn't exist in previous versions }