-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Take the node id into account when creating geoip tmp dir. #70462
Conversation
This change adjust where the geoip tmp directory is created to avoid issues when running multiple nodes on the same machine. In the java tmp dir, a 'geoip-databases' directory is created and directly under this directory a directory with the node id as name is created. This allows safely running multiple nodes on the same machine (this happens mainly during tests). Closes elastic#69972 Relates to elastic#68920
Pinging @elastic/es-core-features (Team:Core/Features) |
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, thanks @martijnvg! I left 1 minor suggestion
throw new UncheckedIOException(e); | ||
} | ||
}).filter(path -> { | ||
return StreamSupport.stream(clusterService().state().nodes().getDataNodes().values().spliterator(), false) |
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 extract data nodes ids to local variable?
Set<String> ids = StreamSupport.stream(clusterService().state().nodes().getDataNodes().values().spliterator(), false)
.map(c -> c.value.getId())
.collect(Collectors.toSet());
final List<Path> geoipTmpDirs = ...
}).filter(path -> ids.contains(path.getFileName().toString()))
Backport elastic#70462 to 7.x branch. This change adjust where the geoip tmp directory is created to avoid issues when running multiple nodes on the same machine. In the java tmp dir, a 'geoip-databases' directory is created and directly under this directory a directory with the node id as name is created. This allows safely running multiple nodes on the same machine (this happens mainly during tests). Closes elastic#69972 Relates to elastic#68920
Backport #70462 to 7.x branch. This change adjust where the geoip tmp directory is created to avoid issues when running multiple nodes on the same machine. In the java tmp dir, a 'geoip-databases' directory is created and directly under this directory a directory with the node id as name is created. This allows safely running multiple nodes on the same machine (this happens mainly during tests). Closes #69972 Relates to #68920
This change adjust where the geoip tmp directory is created
to avoid issues when running multiple nodes on the same machine.
In the java tmp dir, a 'geoip-databases' directory is created and
directly under this directory a directory with the node id as name is created.
This allows safely running multiple nodes on the same machine (this
happens mainly during tests).
Closes #69972
Relates to #68920