container: Handle failed memdb lookups#33882
Merged
cpuguy83 merged 1 commit intomoby:masterfrom Jun 30, 2017
Merged
Conversation
Member
|
|
If a container doesn't exist in the memdb, First will return nil, not an error. This should be checked for before using the result. Signed-off-by: Aaron Lehmann <[email protected]>
abf9a69 to
c26b0cd
Compare
Contributor
|
LGTM |
1 similar comment
Contributor
|
LGTM |
Member
|
CI failure seems related? |
Author
|
It's an existing failure. This PR is the first step in fixing it. #33883 is the second step. |
Member
|
This LGTM, I agree this failure is because we're returning an error here which is caught elsewhere but the real issue is synchronization between the snapshot db and the real db. This just prevents a panic. Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a container doesn't exist in the memdb,
Firstwill returnnil, not an error. This should be checked for before using the result.This fixes the panic in #33863, but does not seem to solve the underlying problem causing test failures.
cc @fabiokung