Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Make reindex throttling dynamic #17262
This creates a rest end point that lets the user change the throttle of reindex. It takes care to reschedule the task if the user tries to speed up the request. This is important so that users undo throttle values that make reindex sleep forever. We also listen for cancelation and wake up if we are sleeping so that cancelled reindex requests that will sleep for a long time die quickly.
Finally, this adds a field to the task status that is "for how much longer will this request sleep?" I needed it debugging some stuff and see no reason to remove it.
This totally needs docs. Also, I'm not sure if this is a good or bad REST location: