Skip to content

Fix race condition in UID lookup#2176

Merged
manolama merged 1 commit into
OpenTSDB:masterfrom
neilfordyce:fix-uid-lookup-race
Oct 14, 2021
Merged

Fix race condition in UID lookup#2176
manolama merged 1 commit into
OpenTSDB:masterfrom
neilfordyce:fix-uid-lookup-race

Conversation

@neilfordyce

Copy link
Copy Markdown
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.

@manolama manolama left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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