You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix deadlock with unclosed pipe of uploaded tarball (wal-g#399)
This problem does not affect buffered storages (like AWS) but can stuck unbuffered (like GCP).
Also this commit fixes problem of premature timeout in GCP storage during ReadObject().
This commit should help to resolvewal-g#266
Fix possible deadlock in background WAL uploader
Stop() of background uploader was acquiring upload scan mutex. Under
this mutex, it was disallowing new uploads and awaits finish of all
spawned uploads. But scan process has to acquire that mutex too.
In various race outcomes, upload could deadlock with Stop().
Now Stop() awaits for finished uploads with the released mutex.
Mutex guards that upload is not started if Stop() in progress.
With current mutex guards, we could relax all atomic operations
with bgUploader.parallelWorkers, but this requires extra refactoring,
now we should just fix the bug.