index-management
index-management copied to clipboard
ISM execute API
Currently, ISM executes when triggered by the job scheduler. The execution interval is defined by the job interval cluster setting, and there is currently no way to initiate an execution for a job besides simply waiting for the job to be scheduled. In integration tests, this causes flakiness, as we force job execution by rewriting the job document to say it was executed some time in the past, so the next execution will be scheduled just a few seconds from the present. This method seems to not be entirely reliable as an overloaded cluster may not pick up the job document change in time to schedule the next execution. Adding a new API to trigger the immediate execution of an Index State Management Job would allow users to better debug policies by triggering an execution on demand to get immediate feedback. Additionally, this API would help reduce test flakiness and drop test run times. It may be helpful to include a flag to optionally override transition conditions with the next execution, in case a user may want to simply execute the next action.