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

Respond to IndexNotFound Exception #590

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

coreyogburn
Copy link
Contributor

On first run, the so-detection index won't be created until the first detection is inserted. This means all calls to GetAllDetections were erroring out. A recent refactor limited the number of indexes on this query and ensured any errors were definitely being captured and as a result this new exception was bubbling up and causing all syncs to fail.

Now when we run into this case, we log that we noticed the error but we return an empty result set without any error. This will allow syncs to continue and insert their first batch, afterwards everything returns to normal.

Added a test for this use case.

On first run, the so-detection index won't be created until the first detection is inserted. This means all calls to GetAllDetections were erroring out. A recent refactor ensured any errors were definitely being captured and as a result this exception was bubbling up and causing all syncs to fail.

Now when we run into this case, we log that we noticed the error but we return an empty result set without any error. This will allow syncs to continue and insert their first batch, afterwards everything returns to normal.

Added a test for this use case.
@coreyogburn coreyogburn merged commit 9d93b18 into 2.4/dev Jul 23, 2024
3 checks passed
@coreyogburn coreyogburn deleted the cogburn/missing-index-fix branch July 23, 2024 16:31
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants