Fix for broken cluster shutdown #30026 (#30034)

This commit is contained in:
Johan Andrén 2021-02-15 17:08:41 +01:00 committed by GitHub
parent 63aa1453d0
commit d92dc9c321
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View file

@ -841,8 +841,8 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef, joinConfigCompatCh
}
def startPrepareForShutdown(): Unit = {
preparingForShutdown = true
if (!preparingForShutdown) {
preparingForShutdown = true
val changedMembers = latestGossip.members.collect {
case m if MembershipState.allowedToPrepareToShutdown(m.status) =>
m.copy(status = PreparingForShutdown)

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2020 Lightbend Inc. <https://www.lightbend.com>
* Copyright (C) 2020-2021 Lightbend Inc. <https://www.lightbend.com>
*/
package akka.cluster
@ -8,7 +8,6 @@ import akka.cluster.MemberStatus.Removed
import akka.remote.testkit.MultiNodeConfig
import akka.remote.testkit.MultiNodeSpec
import akka.util.ccompat._
import com.typesafe.config.ConfigFactory
import org.scalatest.concurrent.Eventually
import scala.concurrent.duration._
@ -19,9 +18,7 @@ object ClusterShutdownSpec extends MultiNodeConfig {
val third = role("third")
val forth = role("forth")
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString("""
# important config
""").withFallback(MultiNodeClusterSpec.clusterConfig)))
commonConfig(debugConfig(on = false).withFallback(MultiNodeClusterSpec.clusterConfig))
}
class ClusterShutdownSpecMultiJvmNode1 extends ClusterShutdownSpec