Skip to content

Check invalid indexes in add_concurrent_index

Patrick Bair requested to merge pb-add-concurrent-index-check-invalid into master

What does this MR do and why?

Currently the add_concurrent_index helper checks for presence of an existing index matching the provided definition and skips index creation if one is found.

However, this doesn't account for invalid indexes, which we typically don't encounter. But, if an invalid index does exist, we skip over it, rather than properly fixing it. This MR changes that behavior to drop and recreate the index if one exists but is invalid.

This change was prompted by this scenario happening in product-intelligence#471

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Patrick Bair

Merge request reports