Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition during index delete #18127

Closed
patrickmann opened this issue Feb 1, 2024 · 0 comments · Fixed by #18146
Closed

Race condition during index delete #18127

patrickmann opened this issue Feb 1, 2024 · 0 comments · Fixed by #18146
Assignees
Labels

Comments

@patrickmann
Copy link
Contributor

patrickmann commented Feb 1, 2024

HS-2287071296

Race condition during index deletion may cause errors in event queries.

Expected Behavior

I should be able to delete an index via the Graylog API without triggering any errors due to race conditions.

Current Behavior

There is a brief lag between deleting an index in OS and in MongoDB.
Event query execution may thus include the index, even though it is already deleted in OS.

Possible Solution

  • Flip the order of events: first delete the index in Mongo, then in OS. This may run into problems, if another thread decides to rebuild the meta-data.
  • use ignore_unavailable option. We usually do this, so we should do it here too.

Steps to Reproduce (for bugs)

Repro is tricky, since it is a short timing window. But if indices are regularly deleted, and event queries are using those indices at the same time, you will eventually see an OS exception index_not_found_exception, reason=no_such_index

Your Environment

  • Graylog Version: 5.2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant