Skip to content

Commit ec70e11

Browse files
authored
Revert "Allow cluster formation with mixed protocols (#1568)" (#1588)
This reverts commit c2d1d9a.
1 parent c2d1d9a commit ec70e11

File tree

2 files changed

+6
-100
lines changed

2 files changed

+6
-100
lines changed

cluster/src/main/scala/org/apache/pekko/cluster/ClusterDaemon.scala

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,6 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef, joinConfigCompatCh
365365
val statsEnabled = PublishStatsInterval.isFinite
366366
var gossipStats = GossipStats()
367367

368-
val acceptedProtocols = context.system.settings.config.getStringList("pekko.remote.accept-protocol-names")
369-
370368
var seedNodes = SeedNodes
371369
var seedNodeProcess: Option[ActorRef] = None
372370
var seedNodeProcessCounter = 0 // for unique names
@@ -703,10 +701,10 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef, joinConfigCompatCh
703701
* which will reply with a `Welcome` message.
704702
*/
705703
def join(address: Address): Unit = {
706-
if (!acceptedProtocols.contains(address.protocol))
704+
if (address.protocol != selfAddress.protocol)
707705
logWarning(
708-
"Trying to join member with wrong protocol, but was ignored, expected any of {} but was [{}]",
709-
acceptedProtocols,
706+
"Trying to join member with wrong protocol, but was ignored, expected [{}] but was [{}]",
707+
selfAddress.protocol,
710708
address.protocol)
711709
else if (address.system != selfAddress.system)
712710
logWarning(
@@ -752,10 +750,10 @@ private[cluster] class ClusterCoreDaemon(publisher: ActorRef, joinConfigCompatCh
752750
def joining(joiningNode: UniqueAddress, roles: Set[String], appVersion: Version): Unit = {
753751
if (!preparingForShutdown) {
754752
val selfStatus = latestGossip.member(selfUniqueAddress).status
755-
if (!acceptedProtocols.contains(joiningNode.address.protocol))
753+
if (joiningNode.address.protocol != selfAddress.protocol)
756754
logWarning(
757-
"Member with wrong protocol tried to join, but was ignored, expected any of {} but was [{}]",
758-
acceptedProtocols,
755+
"Member with wrong protocol tried to join, but was ignored, expected [{}] but was [{}]",
756+
selfAddress.protocol,
759757
joiningNode.address.protocol)
760758
else if (joiningNode.address.system != selfAddress.system)
761759
logWarning(

cluster/src/test/scala/org/apache/pekko/cluster/MixedProtocolClusterSpec.scala

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)