-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
Fix node health-check-related test failures #59277
Fix node health-check-related test failures #59277
Conversation
In elastic#52680 we introduced a new health check mechanism. This commit fixes up some sporadic related test failures, and improves the behaviour of the `FollowersChecker` slightly in the case that no retries are configured. Closes elastic#59252 Closes elastic#59172
Pinging @elastic/es-distributed (:Distributed/Cluster Coordination) |
@@ -327,16 +327,16 @@ public void handleException(TransportException exp) { | |||
failureCountSinceLastSuccess++; | |||
|
|||
final String reason; | |||
if (failureCountSinceLastSuccess >= followerCheckRetryCount) { |
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.
We should check the failure count last so we can report more specific errors (disconnected
etc) if available.
@@ -325,7 +324,7 @@ public FileChannel newFileChannel(Path path, Set<? extends OpenOption> options, | |||
@Override | |||
public void force(boolean metaData) throws IOException { | |||
if (injectIOException.get()) { | |||
if (path.toString().startsWith(pathPrefix) && path.toString().endsWith(".es_temp_file")) { |
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.
No need to check the path starts with /
and, indeed, it doesn't on Windows.
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
In #52680 we introduced a new health check mechanism. This commit fixes
up some sporadic related test failures, and improves the behaviour of
the
FollowersChecker
slightly in the case that no retries areconfigured.
Closes #59252
Closes #59172