Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

@DaveCTurner DaveCTurner commented Feb 14, 2022

This test computes the expected message by tracking the different kinds
of failures generated by a mock transport service. This tracking counts
consecutive failures so is reset on success, but it is not explicitly
reset when starting the second pass. This was usually fine since we
start the second pass with a long sequence of checks that do not fail
which would reset the tracking. Rarely however this sequence was too
short to contain any success responses, so the counters would not be
reset as needed.

This commit makes sure we run at least leaderCheckRetryCount
iterations without a failure to ensure that at least one of them
succeeds.

Closes #83857
Closes #83924

This test computes the expected message by tracking the different kinds
of failures generated by a mock transport service. This tracking counts
consecutive failures so is reset on success, but it is not explicitly
reset when starting the second pass. This was usually fine since we
start the second pass with a long sequence of checks that do not fail
which would reset the tracking. Rarely however this sequence was too
short to contain any success responses, so the counters would not be
reset as needed.

This commit makes sure we run at least `leaderCheckRetryCount`
iterations without a failure to ensure that at least one of them
succeeds.

Closes elastic#83857
@DaveCTurner DaveCTurner added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. v7.17.1 v8.0.1 v8.2.0 v8.1.1 labels Feb 14, 2022
@elasticmachine elasticmachine added the Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. label Feb 14, 2022
@elasticmachine
Copy link
Collaborator

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

@DaveCTurner DaveCTurner merged commit c98a729 into elastic:master Feb 15, 2022
@DaveCTurner DaveCTurner deleted the 2022-02-14-leader-checker-test-failure branch February 15, 2022 15:07
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Feb 15, 2022
This test computes the expected message by tracking the different kinds
of failures generated by a mock transport service. This tracking counts
consecutive failures so is reset on success, but it is not explicitly
reset when starting the second pass. This was usually fine since we
start the second pass with a long sequence of checks that do not fail
which would reset the tracking. Rarely however this sequence was too
short to contain any success responses, so the counters would not be
reset as needed.

This commit makes sure we run at least `leaderCheckRetryCount`
iterations without a failure to ensure that at least one of them
succeeds.

Closes elastic#83857
Closes elastic#83924
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Feb 15, 2022
This test computes the expected message by tracking the different kinds
of failures generated by a mock transport service. This tracking counts
consecutive failures so is reset on success, but it is not explicitly
reset when starting the second pass. This was usually fine since we
start the second pass with a long sequence of checks that do not fail
which would reset the tracking. Rarely however this sequence was too
short to contain any success responses, so the counters would not be
reset as needed.

This commit makes sure we run at least `leaderCheckRetryCount`
iterations without a failure to ensure that at least one of them
succeeds.

Closes elastic#83857
Closes elastic#83924
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Feb 15, 2022
This test computes the expected message by tracking the different kinds
of failures generated by a mock transport service. This tracking counts
consecutive failures so is reset on success, but it is not explicitly
reset when starting the second pass. This was usually fine since we
start the second pass with a long sequence of checks that do not fail
which would reset the tracking. Rarely however this sequence was too
short to contain any success responses, so the counters would not be
reset as needed.

This commit makes sure we run at least `leaderCheckRetryCount`
iterations without a failure to ensure that at least one of them
succeeds.

Closes elastic#83857
Closes elastic#83924
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
7.17
8.0
8.1

elasticsearchmachine pushed a commit that referenced this pull request Feb 15, 2022
This test computes the expected message by tracking the different kinds
of failures generated by a mock transport service. This tracking counts
consecutive failures so is reset on success, but it is not explicitly
reset when starting the second pass. This was usually fine since we
start the second pass with a long sequence of checks that do not fail
which would reset the tracking. Rarely however this sequence was too
short to contain any success responses, so the counters would not be
reset as needed.

This commit makes sure we run at least `leaderCheckRetryCount`
iterations without a failure to ensure that at least one of them
succeeds.

Closes #83857
Closes #83924
elasticsearchmachine pushed a commit that referenced this pull request Feb 15, 2022
This test computes the expected message by tracking the different kinds
of failures generated by a mock transport service. This tracking counts
consecutive failures so is reset on success, but it is not explicitly
reset when starting the second pass. This was usually fine since we
start the second pass with a long sequence of checks that do not fail
which would reset the tracking. Rarely however this sequence was too
short to contain any success responses, so the counters would not be
reset as needed.

This commit makes sure we run at least `leaderCheckRetryCount`
iterations without a failure to ensure that at least one of them
succeeds.

Closes #83857
Closes #83924
elasticsearchmachine pushed a commit that referenced this pull request Feb 15, 2022
This test computes the expected message by tracking the different kinds
of failures generated by a mock transport service. This tracking counts
consecutive failures so is reset on success, but it is not explicitly
reset when starting the second pass. This was usually fine since we
start the second pass with a long sequence of checks that do not fail
which would reset the tracking. Rarely however this sequence was too
short to contain any success responses, so the counters would not be
reset as needed.

This commit makes sure we run at least `leaderCheckRetryCount`
iterations without a failure to ensure that at least one of them
succeeds.

Closes #83857
Closes #83924
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. >test Issues or PRs that are addressing/adding tests v7.17.1 v8.0.1 v8.1.1 v8.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] LeaderCheckerTests testFollowerBehaviour failing [CI] LeaderCheckerTests testFollowerBehaviour failing

4 participants