remove support for legacy Lightbend Split Brain Resolver (#190)
This commit is contained in:
parent
4e1da1e8e2
commit
3c196e98f3
2 changed files with 1 additions and 21 deletions
|
|
@ -19,7 +19,6 @@ import com.typesafe.config.Config
|
||||||
|
|
||||||
import org.apache.pekko
|
import org.apache.pekko
|
||||||
import pekko.annotation.InternalApi
|
import pekko.annotation.InternalApi
|
||||||
import pekko.cluster.sbr.SplitBrainResolverProvider
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* INTERNAL API
|
* INTERNAL API
|
||||||
|
|
@ -27,9 +26,6 @@ import pekko.cluster.sbr.SplitBrainResolverProvider
|
||||||
@InternalApi private[pekko] object JoinConfigCompatCheckCluster {
|
@InternalApi private[pekko] object JoinConfigCompatCheckCluster {
|
||||||
private val DowningProviderPath = "pekko.cluster.downing-provider-class"
|
private val DowningProviderPath = "pekko.cluster.downing-provider-class"
|
||||||
private val SbrStrategyPath = "pekko.cluster.split-brain-resolver.active-strategy"
|
private val SbrStrategyPath = "pekko.cluster.split-brain-resolver.active-strategy"
|
||||||
|
|
||||||
private val AkkaSbrProviderClass = classOf[SplitBrainResolverProvider].getName
|
|
||||||
private val LightbendSbrProviderClass = "com.lightbend.pekko.sbr.SplitBrainResolverProvider"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -45,9 +41,7 @@ final class JoinConfigCompatCheckCluster extends JoinConfigCompatChecker {
|
||||||
val toCheckDowningProvider = toCheck.getString(DowningProviderPath)
|
val toCheckDowningProvider = toCheck.getString(DowningProviderPath)
|
||||||
val actualDowningProvider = actualConfig.getString(DowningProviderPath)
|
val actualDowningProvider = actualConfig.getString(DowningProviderPath)
|
||||||
val downingProviderResult =
|
val downingProviderResult =
|
||||||
if (toCheckDowningProvider == actualDowningProvider || Set(toCheckDowningProvider, actualDowningProvider) == Set(
|
if (toCheckDowningProvider == actualDowningProvider)
|
||||||
AkkaSbrProviderClass,
|
|
||||||
LightbendSbrProviderClass))
|
|
||||||
Valid
|
Valid
|
||||||
else
|
else
|
||||||
JoinConfigCompatChecker.checkEquality(List(DowningProviderPath), toCheck, actualConfig)
|
JoinConfigCompatChecker.checkEquality(List(DowningProviderPath), toCheck, actualConfig)
|
||||||
|
|
|
||||||
|
|
@ -83,20 +83,6 @@ class JoinConfigCompatCheckClusterSpec extends PekkoSpec {
|
||||||
checkInitJoin(oldConfig, newConfig) should ===(Valid)
|
checkInitJoin(oldConfig, newConfig) should ===(Valid)
|
||||||
}
|
}
|
||||||
|
|
||||||
"be valid when updating from Lightbend sbr" in {
|
|
||||||
val oldConfig =
|
|
||||||
ConfigFactory
|
|
||||||
.parseString("""
|
|
||||||
pekko.cluster.downing-provider-class = "com.lightbend.pekko.sbr.SplitBrainResolverProvider"
|
|
||||||
""")
|
|
||||||
.withFallback(system.settings.config)
|
|
||||||
val newConfig =
|
|
||||||
ConfigFactory.parseString("""
|
|
||||||
pekko.cluster.downing-provider-class = "org.apache.pekko.cluster.sbr.SplitBrainResolverProvider"
|
|
||||||
""").withFallback(system.settings.config)
|
|
||||||
checkInitJoin(oldConfig, newConfig) should ===(Valid)
|
|
||||||
}
|
|
||||||
|
|
||||||
"be invalid when different downing-provider" in {
|
"be invalid when different downing-provider" in {
|
||||||
val oldConfig =
|
val oldConfig =
|
||||||
ConfigFactory.parseString("""
|
ConfigFactory.parseString("""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue