-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Remove multiple paths from ShardPath #72713
Conversation
Pinging @elastic/es-core-infra (Team:Core/Infra) |
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.
I left a few comments.
@@ -107,51 +107,38 @@ public static ShardPath loadShardPath(Logger logger, NodeEnvironment env, | |||
ShardId shardId, String customDataPath) throws IOException { | |||
final Path shardPath = env.availableShardPath(shardId); | |||
final Path sharedDataPath = env.sharedDataPath(); | |||
return loadShardPath(logger, shardId, customDataPath, new Path[] { shardPath }, sharedDataPath); | |||
return loadShardPath(logger, shardId, customDataPath, shardPath, sharedDataPath); | |||
} | |||
|
|||
/** | |||
* This method walks through the nodes shard paths to find the data and state path for the given shard. If multiple | |||
* directories with a valid shard state exist the one with the highest version will be used. | |||
* <b>Note:</b> this method resolves custom data locations for the shard. | |||
*/ |
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.
This comment looks out of date now.
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.
Good catch. I tweaked these in 16975ec
} | ||
|
||
/** | ||
* This method walks through the nodes shard paths to find the data and state path for the given shard. If multiple | ||
* directories with a valid shard state exist the one with the highest version will be used. | ||
* <b>Note:</b> this method resolves custom data locations for the shard. | ||
*/ | ||
public static ShardPath loadShardPath(Logger logger, ShardId shardId, String customDataPath, Path[] availableShardPaths, | ||
public static ShardPath loadShardPath(Logger logger, ShardId shardId, String customDataPath, Path availableShardPath, |
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.
Isn't this just shardPath
now?
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.
Yes. Renamed in 16975ec
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.
LGTM.
This reverts commit 08a89c8.
relates #71205