Skip to content
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

Reject multiple data paths on frozen capable nodes #71896

Conversation

henningandersen
Copy link
Contributor

Nodes with a frozen cache no longer supports multiple data paths. This
simplifies cache sizing and avoids the need to support multiple cache
files.

Relates #71844 (which also contains the single line documentation on this).

Nodes with a frozen cache no longer supports multiple data paths. This
simplifies cache sizing and avoids the need to support multiple cache
files.

Relates elastic#71844
@henningandersen henningandersen requested review from tlrx and ywelsch April 20, 2021 07:35
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Apr 20, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

henningandersen added a commit to henningandersen/elasticsearch that referenced this pull request Apr 20, 2021
henningandersen added a commit to henningandersen/elasticsearch that referenced this pull request Apr 20, 2021
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've left just one comment, o.w. looking good.

final List<String> dataPaths = (List<String>) settings.get(Environment.PATH_DATA_SETTING);
if (dataPaths.size() > 1) {
throw new SettingsException(
"setting [{}={}] is not permitted on nodes with multiple data paths [{}]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this interact with the other PR (default frozen cache size) when you have multiple data paths defined and a dedicated frozen node defined, but have not explicitly configured a cache size?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is my intention to make that case fail once I merge the two together.

Copy link
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}
}
}
assertTrue("no shard folder found", shardFolderFound);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe indicate the name of the index in the error?

Copy link
Contributor Author

@henningandersen henningandersen Apr 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 3163266

final ShardPath shardPath = ShardPath.loadShardPath(logger, service, shardId, customDataPath);
if (shardPath != null && Files.exists(shardPath.getDataPath())) {
shardFolderFound = true;
assertEquals(snapshotDirectory, Files.notExists(shardPath.resolveIndex()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could determine snapshotDirectory from the index settings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simply moved this method from SearchableSnapshotsIntegTests so will defer improving this to a follow-up.

@henningandersen henningandersen requested a review from ywelsch April 20, 2021 11:52
Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@henningandersen henningandersen merged commit 67c748e into elastic:master Apr 20, 2021
henningandersen added a commit to henningandersen/elasticsearch that referenced this pull request Apr 20, 2021
Nodes with a frozen cache no longer supports multiple data paths. This
simplifies cache sizing and avoids the need to support multiple cache
files.

Relates elastic#71844
henningandersen added a commit to henningandersen/elasticsearch that referenced this pull request Apr 20, 2021
PartiallyCachedShardAllocationIntegTests does not support multiple data
paths, since it uses frozen cache, fixed.

Caused by elastic#71896
henningandersen added a commit that referenced this pull request Apr 20, 2021
PartiallyCachedShardAllocationIntegTests does not support multiple data
paths, since it uses frozen cache, fixed.

Caused by #71896
henningandersen added a commit that referenced this pull request Apr 20, 2021
Nodes with a frozen cache no longer supports multiple data paths. This
simplifies cache sizing and avoids the need to support multiple cache
files.

Relates #71844
henningandersen added a commit to henningandersen/elasticsearch that referenced this pull request Apr 22, 2021
henningandersen added a commit that referenced this pull request May 5, 2021
henningandersen added a commit that referenced this pull request May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >enhancement Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v7.13.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants