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

[FAB-17184] Skip pulling from remote peers if all remaining missing rwsets are invalid when peer is configured to skip pulling invalid transactions #365

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

caod123
Copy link

@caod123 caod123 commented Dec 4, 2019

Type of change

Improvement

Description

Prior to this change pvtdataprovider would enter the pull retry loop
and still attempt to fetch from peers even if all missing rwsets were
invalid

Related issues

FAB-17184

@lindluni
Copy link
Contributor

lindluni commented Dec 5, 2019

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lindluni
Copy link
Contributor

lindluni commented Dec 5, 2019

Can you rebase this on master to pick up the retryThreshold increase and see if that helps

@caod123
Copy link
Author

caod123 commented Dec 5, 2019

Can you rebase this on master to pick up the retryThreshold increase and see if that helps

Sure

Copy link
Member

@guoger guoger left a comment

Choose a reason for hiding this comment

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

I wonder if we could return a needToRetry bool from populateFromRemotePeers to indicate whether it fails to pull any valid transaction? so we don't necessarily need to keep track of a counter at several places

gossip/privdata/pvtdataprovider_test.go Outdated Show resolved Hide resolved
@caod123
Copy link
Author

caod123 commented Dec 10, 2019

Force-push diff is a little messy because I also rebased off master.

guoger
guoger previously requested changes Dec 11, 2019
Copy link
Member

@guoger guoger left a comment

Choose a reason for hiding this comment

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

I thought about that originally but decided against it since it seemed unintuitive that populateFromRemotePeers should return anything. I don't have any strong opinions though.

IMHO, it's naturally to expect some hints to be returned when it comes to "do something with remote peers". More importantly, i think the code would be more manageable if we don't carry struct member numInvalid all along, and alter it in both populateFromCache and populateFromTransient, especially when we have all the info needed to compute such result in populateFromRemotePeers.

here's what i have in mind guoger@aa2cbf9

let me know what you think

gossip/privdata/pvtdataprovider.go Outdated Show resolved Hide resolved
@caod123 caod123 requested a review from a team as a code owner January 6, 2020 14:41
…wsets

are invalid when peer is configured to skip pulling invalid transactions

* Prior to this change pvtdataprovider would enter the pull retry loop
and still attempt to fetch from peers even if all missing rwsets were
invalid

Signed-off-by: Danny Cao <dcao@us.ibm.com>
Signed-off-by: Jay Guo <guojiannan1101@gmail.com>
@caod123
Copy link
Author

caod123 commented Jan 6, 2020

@guoger since the previous requested change is no longer valid, can you dismiss the requested change to unblock the PR?

@denyeart denyeart dismissed guoger’s stale review January 6, 2020 19:23

Already rebased, no longer relevant.

Copy link
Member

@guoger guoger left a comment

Choose a reason for hiding this comment

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

LGTM, but would like experts in this area to take a look as well.

@denyeart denyeart self-assigned this Jan 7, 2020
Copy link
Contributor

@C0rWin C0rWin left a comment

Choose a reason for hiding this comment

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

Looks good

@C0rWin C0rWin merged commit bfc762b into hyperledger:master Jan 7, 2020
@caod123 caod123 deleted the skip-pull-invalid branch January 7, 2020 14:40
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

5 participants