flant / curator-opensearch

Curator for OpenSearch.
Other
75 stars 28 forks source link

Very slow to do a dry-run with many indexes #26

Open jgough opened 1 year ago

jgough commented 1 year ago

Copying from https://github.com/elastic/curator/issues/1631 as the issue still is a major issue for us:

I'm finding that running Curator with --dry-run can be extremely slow.

As far as I can tell, this is because my cluster has many indexes and it takes roughly 10s to get the full list of indexes. It does this before EVERY action it attempts, so if I have 200 actions then the dry-run takes over 30 minutes to run - most of which is querying OpenSearch for the same list of indexes over and over and over.

In normal mode this makes sense as previous actions can have knock-on effects that affect later actions. However in --dry-run mode it maybe would make a lot more sense to cache the list of indexes and not keep querying OpenSearch for this? It would be a huge speedup and make testing curator actions this way less of a chore.