summaryrefslogtreecommitdiff
path: root/Vagrantfile
diff options
context:
space:
mode:
authorBoaz Leskes <b.leskes@gmail.com>2016-11-15 13:42:26 +0000
committerGitHub <noreply@github.com>2016-11-15 13:42:26 +0000
commitd6c2b4f7c578a6013dfd57806e011030d1647482 (patch)
treebae4cf532012205873e25166ea7377da7565e8c4 /Vagrantfile
parent66fbb0dbc21f56e074981d1cfaaa9e7cf4676336 (diff)
Adapt InternalTestCluster to auto adjust `minimum_master_nodes` (#21458)
#20960 removed `LocalDiscovery` and we now use `ZenDiscovery` in all our tests. To keep cluster forming fast, we are using a `MockZenPing` implementation which uses static maps to return instant results making master election fast. Currently, we don't set `minimum_master_nodes` causing the occasional split brain when starting multiple nodes concurrently and their pinging is so fast that it misses the fact that one of the node has elected it self master. To solve this, `InternalTestCluster` is modified to behave like a true cluster and manage and set `minimum_master_nodes` correctly with every change to the number of nodes. Tests that want to manage the settings themselves can opt out using a new `autoMinMasterNodes` parameter to the `ClusterScope` annotation. Having `min_master_nodes` set means the started node may need to wait for other nodes to be started as well. To combat this, we set `discovery.initial_state_timeout` to `0` and wait for the cluster to form once all node have been started. Also, because a node may wait and ping while other nodes are started, `MockZenPing` is adapted to wait rather than busy-ping.
Diffstat (limited to 'Vagrantfile')
0 files changed, 0 insertions, 0 deletions