-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
construct unreconciled missing pvtdata #1699
construct unreconciled missing pvtdata #1699
Conversation
9352d62
to
f63f517
Compare
gossip/privdata/reconcile.go
Outdated
func constructUnreconciledMissingData(requestedMissingData privdatacommon.Dig2CollectionConfig, fetchedData []*protosgossip.PvtDataElement) ledger.MissingPvtDataInfo { | ||
remainingRequestedData := requestedMissingData |
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.
The name of the function does not indicate that the original input will be modified. If that's the intention, I would suggest to call it this function as removeFetchedData
and do not return anything - instead let the caller prepared the MissingPvtDataInfo
object.
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.
Yes. It does not sound good to manipulate the requested data. I have avoided removing entries from the requested data while constructing the unreconciled missing data.
Signed-off-by: senthil <[email protected]>
f63f517
to
25ed6f8
Compare
@Mergifyio backport release-2.2 |
Command
|
Signed-off-by: senthil <[email protected]> (cherry picked from commit 8c955ea)
Signed-off-by: senthil <[email protected]>
Signed-off-by: senthil <[email protected]>
Signed-off-by: senthil <[email protected]>
Type of change
Description
This PR adds a utility function to construct unreconciled missing pvtdata.
Additional details
This utility function would be used by the reconciler to inform ledger about the unreconciled missing pvtdata. This information would be used by the pvtdata store to deprioritize these missing pvtdata and retried after N iterations of reconciliation.
TxId field present in some of the structs defined in the reconciler/puller is not used. As some involve proto messages, it is not straightforward to remove it (due to rolling upgrade and change in the message format).