fix(sync): don't lose nodes on single download err
All threads resolved!
All threads resolved!
P2pCandidate.dlPromise
promise doesn't resolve on download errors
such as socket timeouts. Each time such an error occurs, the node is lost
for the sync because the 'this.dlPromise.isResolved()' check used for
testing the node's availability never succeeds anymore for this node.
This patch hardens the blocks downloading in two ways:
- Retrying the download up to 5 times when the number of returned blocks is different from what was requested
- On failure returns an empty block array so that the dlPromise is resolved
and the node failure could be handled as expected at the P2PSyncDownloader
level triggering the
P2pCandidate.addFailure()
function.
Merge request reports
Activity
added 1 commit
- 0339a2be - fix(sync): don't lose nodes on single download err
added 1 commit
- b487ff56 - fix(sync): don't lose nodes on single download err
@librelois Comment puis-je accéder à à la log
prettier
? C'est ce qui fait planter le pipeline si je comprends correctement :> duniter@1.8.1 format:check /builds/nodes/typescript/duniter > prettier --list-different 'app/**/*.{ts,json}' app/modules/daemon.ts npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! duniter@1.8.1 format:check: `prettier --list-different 'app/**/*.{ts,json}'` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the duniter@1.8.1 format:check script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/user/.npm/_logs/2021-05-14T18_29_50_861Z-debug.log
- Resolved by pini
- Resolved by Éloïs
Please register or sign in to reply