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 in UID lookup #2176

Merged
merged 1 commit into from
Oct 14, 2021

Conversation

neilfordyce
Copy link
Contributor

Ensure the scanner callback waits for all the UIDs to resolve before calling scan to retrieve the next set of results. If we clear lookups between each row, we only ensure the lookups have resolved for the last row in the iterator.

Not waiting can cause the scanner to close prematurely and return incomplete results.

Fixes #2175

Ensure the scanner callback waits for all the UIDs to resolve before calling scan to retrieve the next set of results.

Not waiting would cause the scanner to close prematurely and return incomplete results.
Copy link
Member

@manolama manolama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup really dumb bug on my part, thanks for catching it!

@manolama manolama merged commit 877cdfa into OpenTSDB:master Oct 14, 2021
@neilfordyce
Copy link
Contributor Author

Perfect, thanks for reviewing!

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.

Incomplete query results - possible UID resolution race condition
2 participants