Overview of the Issue
In #16856 we introduced a mechanism to fail fast when a file fails to be either restored or backed up. This PR also introduces a regression: when a file fails to be backed up, the backup process will still succeed even though the backup is not useable. In this snippet, instead of returning the error from be.backupFile we return another error, which is wrong.
This error only happens if all the backup files have either: started or finished. If we fail to backup a file but there are still files that have not started, we will still cancel the context and all following files will not be able to acquire the semaphore due to a canceled context, leading to the backup process to fail. However, if all the files have already acquired the semaphore, then the bug described above will happen, if a file fails to be backed up.
Reproduction Steps
This issue can be reproduced by running the test in this commit: d04aec6 (#17062).
Binary Version
Operating System and Environment details
Log Fragments
No response
Overview of the Issue
In #16856 we introduced a mechanism to fail fast when a file fails to be either restored or backed up. This PR also introduces a regression: when a file fails to be backed up, the backup process will still succeed even though the backup is not useable. In this snippet, instead of returning the error from
be.backupFilewe return another error, which is wrong.This error only happens if all the backup files have either: started or finished. If we fail to backup a file but there are still files that have not started, we will still cancel the context and all following files will not be able to acquire the semaphore due to a canceled context, leading to the backup process to fail. However, if all the files have already acquired the semaphore, then the bug described above will happen, if a file fails to be backed up.
Reproduction Steps
This issue can be reproduced by running the test in this commit:
d04aec6(#17062).Binary Version
>= v21.0.0-rc1Operating System and Environment details
Log Fragments
No response