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

rpc: set response to nil when not found #12389

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

dnephin
Copy link
Contributor

@dnephin dnephin commented Feb 18, 2022

Otherwise when the query times out we might incorrectly send a value for the reply, when we should send an empty reply.

I went through all the changes in #12110. These were the only two places that seemed to be a problem. The rest appear to correctly set the reply value before returning errNotFound.

Thanks to @rboyer and @kisunji for finding this.

@dnephin dnephin added the pr/no-changelog PR does not need a corresponding .changelog entry label Feb 18, 2022
Otherwise when the query times out we might incorrectly send a value for
the reply, when we should send an empty reply.

Also document errNotFound and how to handle the result in that case.
@dnephin dnephin force-pushed the dnephin/rpc-blocking-queries-not-found-nil branch from 2c8856c to dc484ee Compare February 18, 2022 17:26
@vercel vercel bot temporarily deployed to Preview – consul February 18, 2022 17:26 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging February 18, 2022 17:26 Inactive
@dnephin dnephin merged commit 96029bb into main Feb 18, 2022
@dnephin dnephin deleted the dnephin/rpc-blocking-queries-not-found-nil branch February 18, 2022 18:04
@hc-github-team-consul-core
Copy link
Collaborator

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/589546.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-changelog PR does not need a corresponding .changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants