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

Fix race condition related to debouncing. #4689

Merged
merged 4 commits into from
Mar 9, 2024

Conversation

fulmicoton
Copy link
Contributor

In Ingest v1, queues are created on apply plans.
This means that right after creating an index, documents cannot be inserted.

This was true before, but was dependent on a race condition. It became more apparent after we added debouncing of control plane apply plans.

This PR adds code to make it possible for caller of debounced rebuild plan code, to get notified and wait for a rebuild to be done and applied.

@fulmicoton fulmicoton force-pushed the race-condition-due-to-debouncing branch 3 times, most recently from 4b9fa26 to 25631f1 Compare March 7, 2024 09:38
@fulmicoton fulmicoton changed the title Fix race condition related to deboucing. Fix race condition related to debouncing. Mar 7, 2024
@fulmicoton fulmicoton marked this pull request as ready for review March 7, 2024 09:42
@fulmicoton fulmicoton requested a review from guilload March 7, 2024 09:42
In Ingest v1, queues are created on apply plans.
This means that right after creating an index, documents cannot be
inserted.

This was true before, but was dependent on a race condition. It
became more apparent after we added debouncing of control plane apply plans.

This PR adds code to make it possible for caller of debounced rebuild
plan code, to get notified and wait for a rebuild to be done and
applied.
@fulmicoton fulmicoton force-pushed the race-condition-due-to-debouncing branch from 25631f1 to 0055b2d Compare March 7, 2024 09:51
@fulmicoton fulmicoton enabled auto-merge (squash) March 8, 2024 08:47
@fulmicoton fulmicoton merged commit 2c94074 into main Mar 9, 2024
4 checks passed
@fulmicoton fulmicoton deleted the race-condition-due-to-debouncing branch March 9, 2024 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants