Percona-Lab / mongodb_consistent_backup

A tool for performing consistent backups of MongoDB Clusters or Replica Sets
https://www.percona.com
Apache License 2.0
276 stars 81 forks source link

Abort on tar errors #290

Closed dschneller closed 5 years ago

dschneller commented 5 years ago

This patch improves error handling when tar command aborts. Before that, a message would be logged, but the error not be reported to the caller.

As a result, it could happen that the files that had not yet been moved into a tar would be uploaded as-is, because they were still lying around in the working directory.

With this patch, the TarThread reports more detailed information about its exit status to the pool, so that it can handle failures appropriately.

Sorry for the messy history -- apparently GitHub added a "feature" to maintain history across force pushes, breaking the usual workflow of rebasing a PR onto a more recent upstream version. I hope they revert that.

timvaillancourt commented 5 years ago

LGTM, thanks @dschneller