Skip to content

Hide orphaned tasks from follower stats#48901

Merged
ywelsch merged 3 commits intoelastic:masterfrom
ywelsch:hide-followers-to-be-removed
Nov 8, 2019
Merged

Hide orphaned tasks from follower stats#48901
ywelsch merged 3 commits intoelastic:masterfrom
ywelsch:hide-followers-to-be-removed

Conversation

@ywelsch
Copy link
Copy Markdown
Contributor

@ywelsch ywelsch commented Nov 7, 2019

CCR follower stats can return information for persistent tasks that are in the process of being cleaned up. This is problematic for tests where CCR follower indices have been deleted, but their persistent follower task is only cleaned up asynchronously afterwards. If one of the following tests then accesses the follower stats, it might still get the stats for that follower task.

In addition, some tests were not cleaning up their auto-follow patterns, leaving orphaned patterns behind. Other tests cleaned up their auto-follow patterns. As always the same name was used, it just depended on the test execution order whether this led to a failure or not. This commit fixes the offensive tests, and will also automatically remove auto-follow-patterns at the end of tests, like we do for many other features.

Closes #48700

@ywelsch ywelsch added >non-issue >test Issues or PRs that are addressing/adding tests :Distributed/CCR Issues around the Cross Cluster State Replication features v8.0.0 v7.5.0 v7.6.0 v7.4.3 labels Nov 7, 2019
@ywelsch ywelsch requested a review from dnhatn November 7, 2019 16:48
@elasticmachine
Copy link
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing this

@ywelsch
Copy link
Copy Markdown
Contributor Author

ywelsch commented Nov 7, 2019

PR testing shows that this is unfortunately still failing the test that it set out to fix. While I was able to reproduce with the steps outlined in #48700 and fix that occurrence with this, there seems to be more to this.

@ywelsch
Copy link
Copy Markdown
Contributor Author

ywelsch commented Nov 7, 2019

Finally figured it out. Some tests were not cleaning up their auto-follow patterns, leaving orphaned patterns behind. Other tests cleaned up their auto-follow patterns. As always the same name was used, it just depended on the test execution order whether this led to a failure or not. I've fixed the offensive tests, and also added the ability to automatically remove auto-follow-patterns at the end of test, like we have for many other things.

Copy link
Copy Markdown
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for chasing this test failure.

@ywelsch ywelsch merged commit be849b2 into elastic:master Nov 8, 2019
ywelsch added a commit that referenced this pull request Nov 8, 2019
CCR follower stats can return information for persistent tasks that are in the process of being cleaned up. This is problematic for tests where CCR follower indices have been deleted, but their persistent follower task is only cleaned up asynchronously afterwards. If one of the following tests then accesses the follower stats, it might still get the stats for that follower task.

In addition, some tests were not cleaning up their auto-follow patterns, leaving orphaned patterns behind. Other tests cleaned up their auto-follow patterns. As always the same name was used, it just depended on the test execution order whether this led to a failure or not. This commit fixes the offensive tests, and will also automatically remove auto-follow-patterns at the end of tests, like we do for many other features.

Closes #48700
ywelsch added a commit that referenced this pull request Nov 8, 2019
CCR follower stats can return information for persistent tasks that are in the process of being cleaned up. This is problematic for tests where CCR follower indices have been deleted, but their persistent follower task is only cleaned up asynchronously afterwards. If one of the following tests then accesses the follower stats, it might still get the stats for that follower task.

In addition, some tests were not cleaning up their auto-follow patterns, leaving orphaned patterns behind. Other tests cleaned up their auto-follow patterns. As always the same name was used, it just depended on the test execution order whether this led to a failure or not. This commit fixes the offensive tests, and will also automatically remove auto-follow-patterns at the end of tests, like we do for many other features.

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

Labels

:Distributed/CCR Issues around the Cross Cluster State Replication features >non-issue >test Issues or PRs that are addressing/adding tests v7.5.0 v7.6.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reference/ccr/apis/get-ccr-stats/line_94 docs test failure

5 participants