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

construct unreconciled missing pvtdata #1699

Merged
merged 1 commit into from Aug 10, 2020

Conversation

cendhu
Copy link
Contributor

@cendhu cendhu commented Aug 10, 2020

Type of change

  • New feature

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).

@cendhu cendhu requested a review from a team as a code owner August 10, 2020 14:06
Comment on lines 320 to 321
func constructUnreconciledMissingData(requestedMissingData privdatacommon.Dig2CollectionConfig, fetchedData []*protosgossip.PvtDataElement) ledger.MissingPvtDataInfo {
remainingRequestedData := requestedMissingData
Copy link
Contributor

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.

Copy link
Contributor Author

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 <cendhu@gmail.com>
@manish-sethi manish-sethi merged commit 8c955ea into hyperledger:master Aug 10, 2020
@cendhu
Copy link
Contributor Author

cendhu commented Sep 8, 2020

@Mergifyio backport release-2.2

@mergify
Copy link

mergify bot commented Sep 8, 2020

Command backport release-2.2: success

Backports have been created

mergify bot pushed a commit that referenced this pull request Sep 8, 2020
Signed-off-by: senthil <cendhu@gmail.com>
(cherry picked from commit 8c955ea)
cendhu added a commit to cendhu/fabric that referenced this pull request Sep 8, 2020
Signed-off-by: senthil <cendhu@gmail.com>
cendhu added a commit to cendhu/fabric that referenced this pull request Sep 9, 2020
Signed-off-by: senthil <cendhu@gmail.com>
denyeart pushed a commit that referenced this pull request Sep 16, 2020
Signed-off-by: senthil <cendhu@gmail.com>
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.

None yet

2 participants