Description
Steps of reproduction
Create 10+ default indexes on bucket beer-sample.
Delete the bucket,
Not all indexes are getting deleted.
This is due to a racy code in the DeleteAllIndexFromSource function and there looks bit inefficiency in the way we handle the index deletions there. Lots of repeated/redundant checks can be seen.
Along with the above simplification changes, making the whole target indexes set deletions atomic seems a win here.