Skip to content

Failed backup does not report itself as failed #17063

@frouioui

Description

@frouioui

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

>= v21.0.0-rc1

Operating System and Environment details

n/a

Log Fragments

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions