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

Do not reject messages from an unrecognized identity #1224

Merged
merged 3 commits into from
Mar 22, 2023

Conversation

awrichar
Copy link
Contributor

Because batch downloads happen asynchronously on download manager, it's possible
that the details for an identity claim may be downloaded after other things
created by that identity.

Instead of flatly rejecting all messages from an unknown identity, leave them
in pending state so that they can be unstuck by a later rewind.

Fixes #1221

return false, nil // This is not retryable. skip this batch
// Only private messages, or root org broadcasts can have an unregistered identity
l.Warnf("Skipping message '%s'. Author '%s' could not be resolved: %s", msg.Header.ID, msg.Header.Author, err)
return core.ActionWait, nil // Wait in case the identity is resolved later
Copy link
Contributor Author

@awrichar awrichar Mar 17, 2023

Choose a reason for hiding this comment

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

This is the material change that solves the bug. Everything else is just cleanup to make this possible.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
Because batch downloads happen asynchronously on download manager, it's possible
that the details for an identity claim may be downloaded after other things
created by that identity.

Instead of flatly rejecting all messages from an unknown identity, leave them
in pending state so that they can be unstuck by a later rewind.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
@codecov-commenter
Copy link

codecov-commenter commented Mar 17, 2023

Codecov Report

Merging #1224 (b3b2c4d) into main (26bc92c) will decrease coverage by 0.06%.
The diff coverage is 87.36%.

❗ Current head b3b2c4d differs from pull request most recent head 2965807. Consider uploading reports for the commit 2965807 to get more accurate results

@@            Coverage Diff             @@
##             main    #1224      +/-   ##
==========================================
- Coverage   99.99%   99.93%   -0.06%     
==========================================
  Files         306      306              
  Lines       20115    20112       -3     
==========================================
- Hits        20113    20098      -15     
- Misses          1       13      +12     
  Partials        1        1              
Impacted Files Coverage Δ
pkg/core/message.go 86.81% <0.00%> (-13.19%) ⬇️
internal/definitions/handler.go 100.00% <100.00%> (ø)
internal/definitions/handler_contracts.go 100.00% <100.00%> (ø)
internal/definitions/handler_datatype.go 100.00% <100.00%> (ø)
internal/definitions/handler_identity_claim.go 100.00% <100.00%> (ø)
internal/definitions/handler_identity_update.go 100.00% <100.00%> (ø)
...ernal/definitions/handler_identity_verification.go 100.00% <100.00%> (ø)
internal/definitions/handler_network_node.go 100.00% <100.00%> (ø)
internal/definitions/handler_network_org.go 100.00% <100.00%> (ø)
internal/definitions/handler_tokenpool.go 100.00% <100.00%> (ø)
... and 1 more

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@peterbroadhurst peterbroadhurst left a comment

Choose a reason for hiding this comment

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

👍 - looks great. Thanks for working through all the thinking needed on this one, to determine the fix is actually very small.

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.

Late joiners to a multiparty network fail to process previous definitions
3 participants