Description
What is the bug?
Coming from #1195: we introduced the indexState field to the metadata cache, but due to the transaction system, this index state isn't always kept up to date. Specifically, during rollback operations and during index creation, we sometimes leave the index state in the "refreshing" or "creating" state.
This is fine for the front-end feature this was implemented for, since all we really care about is whether the index is "active" or not. But it may have an effect on any features that want to use this cache expecting the state to be accurate.
For the moment, there's a comment documenting the restriction.
How can one reproduce the bug?
- Create a materialized view where refresh happens after the creation step
- Monitor the index status
What is the expected behavior?
The index state should (ideally) always be in sync.
What is your host/environment?
- OpenSearch Spark (mainline)
Do you have any screenshots?
N/A
Do you have any additional context?
Marking the issue wontfix
for now as we don't really need this to be accurate for any current feature, just making this issue to track the bug. Feel free to comment if this is needed.