-
Notifications
You must be signed in to change notification settings - Fork 4
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
bugfix: KVStore (analyzer cache): Fix retrieval and error handling #409
Conversation
f8d29c7
to
729d71c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this do?
storage/oasis/nodeapi/file/common.go
Outdated
if err2 != nil { | ||
cache.logger.Warn(fmt.Sprintf("failed to unmarshal key %s from cache into %T: %v", key.Pretty(), result, err2)) | ||
} | ||
var result *Value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have it unmarshal into a nil pointer? 🤨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was supposed to be a quick blind&untested fix, more like a suggestion to the existing PR. Instead, my commits became its own thing now. Thanks, fixed, and added unit tests.
7bb0e09
to
48366eb
Compare
Co-authored-by: Peter Us <[email protected]>
48366eb
to
1a06549
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selfhighfive.gif 🙄
I have to formally approve since ptrus
is not in CODEOWNERS.
[Mitja] This PR cleans up KVStore and fixes a bug in the process:
GetFromCacheOrCall
where if a value was in the cache, we used to not use itGetFromCacheOrCall
where if a value was in the cache but couldn't be retrieved correctly (e.g. because of the wrong type), we logged too many errors