Skip to content

[BUG] Metadata cache for index state isn't always in sync #1214

Open
@Swiddis

Description

@Swiddis

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?

  1. Create a materialized view where refresh happens after the creation step
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions