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

[Remote Cluster State] Improve stale file deletion logic #12889

Closed
shiv0408 opened this issue Mar 25, 2024 · 2 comments · Fixed by #13131 or #13995
Closed

[Remote Cluster State] Improve stale file deletion logic #12889

shiv0408 opened this issue Mar 25, 2024 · 2 comments · Fixed by #13131 or #13995
Labels
Cluster Manager enhancement Enhancement or improvement to existing feature or request

Comments

@shiv0408
Copy link
Member

Is your feature request related to a problem? Please describe

Currently, we are checking and deleting the stale files on every cluster state update. With this logic, we make a list and get calls to our remote repository in all the cluster state updates. If I have a workload, requiring adding dynamic mappings suppose, it will have lots of cluster state updates in every mapping update. This causes lots of list and get calls to repository, having substantial increase in costs for our usecase.

Describe the solution you'd like

If we move away from cleaning the remote files on every cluster state to a configurable period and number of updates after which this will be triggered, it will provide a better customer experience.
We could configure a default period of x hours and number of updates to y. We will clean up the remote files after y number of cluster state updates or x hours, whatever comes first.

Related component

Cluster Manager

Describe alternatives you've considered

If we go ahead with just a period, then if we have are having large number of cluster state updates, the number of stale files will increase significantly and stay there until the period is over.

Similarly, if we just have clean up after n updates, this also may cause stale files to stay in the repository, if updates are infrequent and state is not updated for a long time.

Additional context

No response

@peternied
Copy link
Member

[Triage - attendees 1 2 3 4 5 6 7]
@shiv0408 Thanks for creating this issue, we'd welcome a pull request to improve this functionality.

@reta
Copy link
Collaborator

reta commented Jun 4, 2024

The change was reverted due to flaky tests, reopening the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cluster Manager enhancement Enhancement or improvement to existing feature or request
Projects
Status: ✅ Done
3 participants