-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Check for default.path.data included in path.data #24285
Check for default.path.data included in path.data #24285
Conversation
If the user explicitly configured path.data to include default.path.data, then we should not fail the node if we find indices in default.path.data. This commit addresses this.
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.
left a suggestion but LGTM otherwise
|
||
boolean includedInPathData = false; | ||
for (final NodeEnvironment.NodePath dataPath : nodeEnv.nodePaths()) { | ||
includedInPathData |= Files.isSameFile(dataPath.path, defaultNodeDirectory); |
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.
maybe move the loop in a method then we can return early and don't need a label / boolean var in the outer loop
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 pushed 7d53317.
It is incredibly fortunate that you asked for this. As a result of asking for this, I made the necessary change and tried to run gradle :core:test -Dtests.class=org.elasticsearch.node.NodeTests -Dtests.iters=128
from the command-line to ensure that the change did not break anything. This failed, Gradle told me that no tests were executed. It turns out that org.elasticsearch.node.NodeTests
was sitting in the test framework in src/main/java
, so these tests were not executing. It appears the class has been like this since July of last year. Fortunately, nothing is broken. I moved this test class to the appropriate location in core.
If the user explicitly configured path.data to include default.path.data, then we should not fail the node if we find indices in default.path.data. This commit addresses this. Relates #24285
If the user explicitly configured path.data to include default.path.data, then we should not fail the node if we find indices in default.path.data. This commit addresses this. Relates #24285
If the user explicitly configured path.data to include default.path.data, then we should not fail the node if we find indices in default.path.data. This commit addresses this. Relates #24285
😨 |
I'll look at changing the gradle task that we have for naming conventions to detect that one.... |
Good call @nik9000, thanks for picking this up. |
If the user explicitly configured path.data to include default.path.data, then we should not fail the node if we find indices in default.path.data. This commit addresses this.
Closes #24283