-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Allocate newly created indices on data_hot tier nodes #61342
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
83fc4a7
Allocate newly created indices on data_hot tier nodes
dakrone 3b60e93
Fix docs
dakrone 5005a73
Switch from setting listener to explicit index setting provider
dakrone b4183a7
Unset tier include for JDBC tests
dakrone dfe922b
Use Settings instead of a Map<String, String>
dakrone 08e4ab5
Check for all index level allocation settings when putting explicit s…
dakrone f1c44a2
Fix some tests
dakrone 53a5ed7
Fix ILM test
dakrone ed6c3dc
Merge branch 'master' into dt-default-deploy-on-hot
elasticmachine 7c001cf
Merge remote-tracking branch 'origin/master' into dt-default-deploy-o…
dakrone 5039087
Fix typos and listener -> provider after refactor
dakrone d659748
Pass exceptions through, preventing index creation if provider fails
dakrone 055c642
Add debug log message when skipping hot tier allocation
dakrone 7b29826
Rename node starting helpers in DataTierIT
dakrone 7a70b0c
Add debug log for explicit setting cancelled out by template/request
dakrone 17bde03
Rename Explicit -> Additional, collapse to Plugin instead of new plugin
dakrone e95e922
Merge branch 'master' into dt-default-deploy-on-hot
elasticmachine 2aa7b4f
getAdditionalSettingProviders -> getAdditionalIndexSettingProviders
dakrone 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
This file contains 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 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 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 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 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 |
---|---|---|
|
@@ -181,6 +181,9 @@ public boolean match(DiscoveryNode node) { | |
} | ||
} | ||
} | ||
} else if ("_tier".equals(attr)) { | ||
// Always allow _tier as an attribute, will be handled elsewhere | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. outside the scope of this PR, but can you use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes you can, I added tests for that in #60994 |
||
return true; | ||
} else { | ||
String nodeAttributeValue = node.getAttributes().get(attr); | ||
if (nodeAttributeValue == null) { | ||
|
36 changes: 36 additions & 0 deletions
36
server/src/main/java/org/elasticsearch/index/shard/IndexSettingProvider.java
This file contains 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,36 @@ | ||
/* | ||
* 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.index.shard; | ||
|
||
import org.elasticsearch.common.settings.Settings; | ||
|
||
/** | ||
* An {@link IndexSettingProvider} is a provider for index level settings that can be set | ||
* explicitly as a default value (so they show up as "set" for newly created indices) | ||
*/ | ||
public interface IndexSettingProvider { | ||
/** | ||
* Returns explicitly set default index {@link Settings} for the given index. This should not | ||
* return null. | ||
*/ | ||
default Settings getAdditionalIndexSettings(String indexName, Settings templateAndRequestSettings) { | ||
return Settings.EMPTY; | ||
} | ||
} |
This file contains 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 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.
probably want to update https://www.elastic.co/guide/en/elasticsearch/reference/7.9/shard-allocation-filtering.html with or soon after this PR. (also https://www.elastic.co/guide/en/elasticsearch/reference/7.9/modules-node.html#data-node could use an update, but is outside the scope of this PR)
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.
Definitely, I am leaving documentation for a subsequent PR though, in the chance that these end up having a name change. I will make sure they are handled in the documentation PR.