Automate the deletion of the old Index after a reindex has completed
Overview
Currently every time we do a reindex we have to manually delete the old index. usually we wait for confirmation that the reindex is completed and of good quality before deleting the old index. If something was wrong coping back the old index may prove to be the most practical solution.
Proposal
Because deleting the old index after the reindexing is a manual task that is required often we should Automate this to simplify this task. Because some self-managed users might not want to delete the old index this should include a change to the UI where we allow the user to cancel. This should also be accompanied with a Message that explains when the old index will be deleted.
Things to consider
- What test confirms the new index is healthy prior to deletion?
- Should the cancel button just be a disable?
- Disable/Enable automatic deletion of old index.
- Should the messaging also confirm the new index is working?
- What default should we use for time till deletion? 2 weeks from confirmation the new index is healthy?
Discussion leading to this proposal
The following discussion from !34069 (merged) should be addressed:
-
@DylanGriffith started a discussion: (+4 comments) Perhaps we should not delete the index for now. I've not been deleting until later in case something goes wrong when doing the reindexing
Terri Chu Terri Chu @terrichu · 1 day ago Developer
When doing reindexing manually in the past, I've always left the previous index in place until I was happy with the new one. I was thinking about how this could be automated. Maybe the route that project deletions are done (scheduled in the future with some messaging to the user)? It seems like it could be a new issue to figure it out anyhow. WDYT?
Dmitry Gruzd Dmitry Gruzd @dgruzd · 1 day ago Developer
@terrichu this is a great idea, thanks! We might display a warning message that the index will be deleted after N days with a button to cancel. Let's create an issue for that