[WIP] one leader per cluster team (#23239)

* Guarantee no sneaky type puts more teams in the role list

* Leader per team and initial tests

* MiMa filters

* Second iteration (not working though)

* Verbose gossip logging etc.

* Gossip to team-nodes even if there is inter-team unreachability

* More work ...

* Marking removed nodes with tombstones in Gossip

* More test coverage for Gossip.remove

* Bug failing other multi-node tests squashed

* Multi-node test for team-split

* Review fixes - only prune tombstones on leader ticks

* Clean code is happy code.

* All I want is for MiMa to be my friend

* These constants are internal

* Making the formatting gods happy

* I used the wrong reachability for ignoring gossip :/

* Still hadn't quite gotten how reachability was supposed to work

* Review feedback applied

* Cross-team downing should still work

* Actually prune tombstones in the prune tombstones method ...

* Another round against reachability. Reachability leading with 15 - 2 so far.
This commit is contained in:
Johan Andrén 2017-07-04 09:09:40 +01:00 committed by Patrik Nordwall
parent 0115d5fdda
commit 164387a89e
20 changed files with 1990 additions and 284 deletions

View file

@ -420,13 +420,32 @@ class Cluster(val system: ExtendedActorSystem) extends Extension {
private[cluster] object InfoLogger {
def logInfo(message: String): Unit =
if (LogInfo) log.info("Cluster Node [{}] - {}", selfAddress, message)
if (LogInfo)
if (settings.Team == ClusterSettings.DefaultTeam)
log.info("Cluster Node [{}] - {}", selfAddress, message)
else
log.info("Cluster Node [{}] team [{}] - {}", selfAddress, settings.Team, message)
def logInfo(template: String, arg1: Any): Unit =
if (LogInfo) log.info("Cluster Node [{}] - " + template, selfAddress, arg1)
if (LogInfo)
if (settings.Team == ClusterSettings.DefaultTeam)
log.info("Cluster Node [{}] - " + template, selfAddress, arg1)
else
log.info("Cluster Node [{}] team [{}] - " + template, selfAddress, settings.Team, arg1)
def logInfo(template: String, arg1: Any, arg2: Any): Unit =
if (LogInfo) log.info("Cluster Node [{}] - " + template, selfAddress, arg1, arg2)
if (LogInfo)
if (settings.Team == ClusterSettings.DefaultTeam)
log.info("Cluster Node [{}] - " + template, selfAddress, arg1, arg2)
else
log.info("Cluster Node [{}] team [{}] - " + template, selfAddress, settings.Team, arg1, arg2)
def logInfo(template: String, arg1: Any, arg2: Any, arg3: Any): Unit =
if (LogInfo)
if (settings.Team == ClusterSettings.DefaultTeam)
log.info("Cluster Node [{}] - " + template, selfAddress, arg1, arg2, arg3)
else
log.info("Cluster Node [{}] team [" + settings.Team + "] - " + template, selfAddress, arg1, arg2, arg3)
}
}