-
Notifications
You must be signed in to change notification settings - Fork 790
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
Distibuted work fixes #2230
Merged
zhyatt
merged 17 commits into
nanocurrency:master
from
guilhermelawless:distibuted-work-fixes
Aug 23, 2019
Merged
Distibuted work fixes #2230
zhyatt
merged 17 commits into
nanocurrency:master
from
guilhermelawless:distibuted-work-fixes
Aug 23, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guilhermelawless
added
bug
quality improvements
This item indicates the need for or supplies changes that improve maintainability
labels
Aug 20, 2019
cryptocode
reviewed
Aug 20, 2019
cryptocode
approved these changes
Aug 20, 2019
SergiySW
approved these changes
Aug 22, 2019
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.
Don't like generating work if node has remote peers, but seems good
This change enhances the previous behavior. Local work generation is only used after all peers are unresponsive. A flag is set in the node (unresponsive_work_peers) so that for the next distributed work, local generation will start immediately. Work peer requests are still sent, and as soon as one replies with valid work, local generation is delayed again, until all are unresponsive, and so on. This is more of a fallback mechanism when all peers are failing, as the previous behavior would always wait for timeouts on peers (which can be long, 2 minutes here). The only case not handled for simplicity is when multiple work is queued, and the first one has unresponsive peers. In this case, the currently queued work requests will not start work generation immediately, only for the next queued distributed work.
SergiySW
approved these changes
Aug 23, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
quality improvements
This item indicates the need for or supplies changes that improve maintainability
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Distributed work was having some issues:
node::stop()
until work finishedSo those are all fixed, and added a startup log if there is no local work generation set and no work peers defined.