Skip to content
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

[7.x] Clean up ShardFollowTasks for deleted indices (#44702) #44790

Merged

Conversation

tlrx
Copy link
Member

@tlrx tlrx commented Jul 24, 2019

Deleting a follower index does not delete its ShardFollowTasks, potentially
leaving many persistent tasks in the cluster that cannot be allocated on
nodes and unnecessary fill the logs. This commit adds a cluster state listener
(ShardFollowTaskCleaner) that completes (with a failure) any persistent task
that refers to a non existent follower index.

I think that this bug has been introduced by #34404: before this change the
task would have been completed as failed and removed from the cluster state.

Backport of #44702

Deleting a follower index does not delete its ShardFollowTasks, potentially
leaving many persistent tasks in the cluster that cannot be allocated on
nodes and unnecessary fill the logs. This commit adds a cluster state listener
(ShardFollowTaskCleaner) that completes (with a failure) any persistent task
that refers to a non existent follower index.

I think that this bug has been introduced by elastic#34404: before this change the
task would have been completed as failed and removed from the cluster state.
@tlrx tlrx added the backport label Jul 24, 2019
…ex (elastic#44801)

This commit unmutes and renames the test that failed on CI (elastic#44796)
after elastic#44702 has been merged.

This test assumes that follow stats still exist after a follower index has
been deleted. The follow stats are based on persistent tasks, and
since elastic#44702 the persistent tasks of deleted following indices are now
 automatically cleaned up to avoid to bloat the cluster state.

I don't think we should report any follow stats for deleted indices and I
don't think that this test makes much sense now the tasks are cleaned
up. This is why the test has been renamed.

closes elastic#44796
@tlrx tlrx merged commit 9944e19 into elastic:7.x Jul 25, 2019
@tlrx tlrx deleted the clean-up-shard-follow-tasks-for-deleted-indices-on-7.x branch July 25, 2019 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant