You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But how do we know we should retry it? When cancelling we need to place some state in the database that indicates that AddPiece with certain parameters was cancelled. Or better yet, add it in the beginning and removing it when add_piece finishes.
You're right, AddPiece is not idempotent at this stage, as it'll create a new sector each time it is called.
It is cancellation safe though, because when interrupted it does not leave the state corrupted.
It won't add deal to a sector, the SP will be slashed and end of story.
About retries, right... We don't have a mechanism for that yet.
We'd need to store the state of the piece somewhere (modify the deal storage, because AddPiece can be called again solely based on published deal data) and have some periodic scanner, on startup that checks whether something was in process but not finished and clean it up, call add piece again.
About the retries, it depends where the error happened. If it was a disk failure, it might not be worth it
Originally posted by @jmg-duarte in #483 (comment)
E.g. when Piece was being added, and cancelled (node shutdown), on boot we need to check pieces which have been cancelled and retry them.
The text was updated successfully, but these errors were encountered: