Conversation
|
Is there anything that blocks this small change from getting merged? |
|
I'm not really sure about the design. Is it really the right way to blindly retry an operation lots of times? One problem I see is that with infinite retries the shutdown of restic won't work properly in case of errors: e.g. removing a lock file might retry forever preventing restic from exiting. A similar behavior shows for other operations that can fail permanently. |
I do not question whether it is a good design to often retry or not. However, in the actual implementation restic retries 10 times and a specific total amount of time before giving up. As timings always can depend on the environment used, I would prefer to have user-definable setting with a sensible default value.
I agree that infinite trying is a bad idea. I propose the following:
|
This is now implemented. |
Adds the new flag --retires to set the maximum number of retries for file operations. Setting to -1 means infinite retry.
|
The warning message is now corrected. |
What is the purpose of this change? What does it change?
Adds the new flag --retries to set the maximum number of retries for file operations.
If the number of retires is set higher than 20, restic will print out a warning.
Was the change discussed in an issue or in the forum before?
See issue #2504, first open point.
Closes #3223
Checklist
changelog/unreleased/that describes the changes for our users (template here)gofmton the code in all commits