Aiven-Open / myhoard

MySQL Backup and Point-in-time Recovery service
Apache License 2.0
93 stars 20 forks source link

Use rohmu transfer pool to fix io error on closed fds on restore #182

Closed giacomo-alzetta-aiven closed 8 months ago

giacomo-alzetta-aiven commented 9 months ago

About this change: What it does, why it matters

Currently myhoard can fail with: ValueError: I/O operation on closed file during restore (. The problem is likely due to non thread-safety of the rohmu transfers.

Using rohmu's transfer pool we should eliminate any possible case in which multiple threads operated on the same transfer object, or cases in which a "stale" transfer object was used by a single thread.

giacomo-alzetta-aiven commented 9 months ago

Seem like CI is broken? It failed to setup the linting...

codecov-commenter commented 8 months ago

Codecov Report

Attention: Patch coverage is 83.72093% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 78.54%. Comparing base (c53a64f) to head (0ed5c6a).

Files Patch % Lines
myhoard/restore_coordinator.py 83.72% 4 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #182 +/- ## ========================================== - Coverage 79.22% 78.54% -0.69% ========================================== Files 16 16 Lines 4506 4503 -3 Branches 1018 1021 +3 ========================================== - Hits 3570 3537 -33 - Misses 699 729 +30 Partials 237 237 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.