-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Accumulated improvements to ZenDiscovery #7493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
63d0406
[Discovery] lightweight minimum master node recovery
kimchy 4824f05
[Internal] make no master lock an instance var so it can be configured
kimchy 6ede83a
[Discovery] add rejoin on master gone flag, defaults to false
kimchy 97bdc8f
[Discovery] Make noMasterBlock configurable and added simple test tha…
martijnvg 3cdbb1a
[Discovery] Enable `discovery.zen.rejoin_on_master_gone` setting in D…
martijnvg 549076e
[Discovery] Changed the default for the 'rejoin_on_master_gone' optio…
martijnvg 89a50f6
[Discovery] If available newly elected master node should take over p…
martijnvg 2220c66
[Discovery] Eagerly clean the routing table of shards that exist on n…
martijnvg a9aa10a
Updated to use ClusterBlocks new constructor signature
bleskes d44bed5
[Internal] Do not execute cluster state changes if current node is no…
bleskes 2c9ef63
[TEST] It may take a little bit before the unlucky node deals with th…
martijnvg fc8ae4d
[TEST] Added test that verifies data integrity during and after a sim…
martijnvg e7d24ec
[TEST] Make sure there no initializing shards when network partition …
martijnvg 4828e78
[TEST] Added test that exposes a shard consistency problem when isola…
martijnvg 424a2f6
[Discovery] Removed METADATA block
martijnvg 1849d09
[Discovery] Made 'discovery.zen.rejoin_on_master_gone' setting updata…
martijnvg 58f8774
[Discovery] do not use versions to optimize cluster state copying for…
bleskes f3d90cd
[TEST] Remove 'index.routing.allocation.total_shards_per_node' settin…
martijnvg e39ac7e
[Test] testIsolateMasterAndVerifyClusterStateConsensus didn't wait o…
bleskes 7db9e98
[Discovery] Change (Master|Nodes)FaultDetection's connect_on_network_…
bleskes 8b85d97
[Discovery] Improved logging when a join request is not executed beca…
bleskes 5d13571
[Discovery] when master is gone, flush all pending cluster states
bleskes 28489ce
[Tests] Added ServiceDisruptionScheme(s) and testAckedIndexing
bleskes 8aed9ee
[TEST] Check if worker if null to prevent NPE on double stopping
martijnvg 785d0e5
[TEST] Reduced failures in DiscoveryWithNetworkFailuresTests#testAcke…
martijnvg f7b962a
[TEST] Renamed afterDistribution timeout to expectedTimeToHeal
martijnvg a7a61a0
[Test] ensureStableCluster failed to pass viaNode parameter correctly
bleskes 1af82fd
[Tests] Disabling testAckedIndexing
bleskes c3e84eb
Fixed compilation issue caused by the lack of a thread pool name
bleskes 98084c0
[TEST] Added test to verify if 'discovery.zen.rejoin_on_master_gone' …
martijnvg 52f69c6
[TEST] Verify no master block during partition for read and write apis
martijnvg 77dae63
[TEST] Make sure get request is always local
martijnvg 5e5f8a9
Added java docs to all tests in DiscoveryWithNetworkFailuresTests
bleskes e897dcc
[Tests] improved automatic disruption healing after tests
bleskes d99ca80
[TEST] Properly clear the disruption schemes after test completed.
martijnvg 48c7da1
[Test] testVerifyApiBlocksDuringPartition - wait for stable cluster a…
bleskes 5302a53
[Discovery] immediately start Master|Node fault detection pinging
bleskes 3586e38
[Discovery] Start master fault detection after pingInterval
bleskes 522d4af
[Tests] Use local gateway
bleskes 7b6e194
[Tests] Don't log about restoring a partition if the partition is not…
bleskes c12d090
[Tests] Increase timeout when waiting for partitions to heal
bleskes e0543b3
[Internal] Migrate new initial state cluster update task to a Cluster…
bleskes 7fa3d70
[logging] don't log an error if scheduled reroute is rejected because…
bleskes ccabb4a
Remove unneeded reference to DiscoveryService which potentially cause…
bleskes ea27837
[Tests] Introduced ClusterDiscoveryConfiguration
bleskes bebaf97
[Tests] stability improvements
bleskes f029a24
[Store] migrate non-allocated shard deletion to use ClusterStateNonMa…
bleskes 67685cb
Discovery: If not enough possible masters are found, but there are ma…
martijnvg 5e38e9e
Discovery: Only add local node to possibleMasterNodes if it is a mast…
martijnvg c2142c0
Discovery: Don't include local node to pingMasters list. We might end…
martijnvg a409848
[Tests] Fixed some issues with SlowClusterStateProcessing
bleskes ffcf107
[Discovery] join master after first election
bleskes cccd060
[Discovery] verify we have a master after a successful join request
bleskes 0244ddb
retry logic to unwrap exception to check for illegal state
kimchy 130e680
[Discovery] Made the handeling of the join request batch oriented.
martijnvg 364374d
[TEST] Added test that verifies that no shard relocations happen duri…
martijnvg 4b8456e
[Discovery] Master fault detection and nodes fault detection should t…
martijnvg 50f852f
[TEST] Added LongGCDisruption and a test simulating GC on master nodes
bleskes 403ebc9
[Discovery] Added cluster version and master node to the nodes fault …
martijnvg 47326ad
[TEST] Make sure all shards are allocated before killing a random dat…
martijnvg 966a55d
Typo: s/Recieved/Received
martijnvg 26d9088
[Transport] Introduced worker threads to prevent alien threads of ent…
bleskes 702890e
[TEST] Remove the forceful `network.mode` setting in DiscoveryWithSe…
martijnvg c8919e4
[TEST] Changed action names.
martijnvg 5932371
[TEST] Adapt testNoMasterActions since metadata isn't cleared if ther…
martijnvg ff8b740
[Discovery] add a debug log if a node responds to a publish request a…
bleskes d5552a9
[Discovery] UnicastZenPing should also ping last known discoNodes
bleskes 183ca37
Code style improvement
bleskes d159097
[Internal] moved ZenDiscovery setting to use string constants
bleskes 680fb36
[Discovery] Add try/catch around repetitive onSuccess calls
bleskes ed5b2e0
Add an assertion to ZenDiscovery checking that local node is never el…
bleskes d8a5ff0
[Internal] introduce ClusterState.UNKNOWN_VERSION constant
bleskes 596a4a0
[Internal] Extract a common base class for (Master|Nodes)FaultDetection
bleskes 34f4ca7
[Cluster] Refactored ClusterStateUpdateTask protection against execut…
bleskes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/main/java/org/elasticsearch/cluster/ClusterStateNonMasterUpdateTask.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /* | ||
| * Licensed to Elasticsearch under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| package org.elasticsearch.cluster; | ||
|
|
||
| /** | ||
| * This is a marker interface to indicate that the task should be executed | ||
| * even if the current node is not a master. | ||
| */ | ||
| public abstract class ClusterStateNonMasterUpdateTask extends ClusterStateUpdateTask { | ||
|
|
||
| @Override | ||
| public boolean runOnlyOnMaster() { | ||
| return false; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/org/elasticsearch/cluster/ProcessedClusterStateNonMasterUpdateTask.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /* | ||
| * Licensed to Elasticsearch under one or more contributor | ||
| * license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright | ||
| * ownership. Elasticsearch licenses this file to you under | ||
| * the Apache License, Version 2.0 (the "License"); you may | ||
| * not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
| package org.elasticsearch.cluster; | ||
|
|
||
| /** | ||
| * A combination between {@link org.elasticsearch.cluster.ProcessedClusterStateUpdateTask} and | ||
| * {@link org.elasticsearch.cluster.ClusterStateNonMasterUpdateTask} to allow easy creation of anonymous classes | ||
| */ | ||
| abstract public class ProcessedClusterStateNonMasterUpdateTask extends ProcessedClusterStateUpdateTask { | ||
|
|
||
| @Override | ||
| public boolean runOnlyOnMaster() { | ||
| return false; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we sure the
clusterService.state()can never be null?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't. many things rely on that fact...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok fine! :)