Skip to content

Commit

Permalink
Merge pull request #636 from Aiven-Open/rdunklau/allow_more_retries
Browse files Browse the repository at this point in the history
Add more retries when restoring a basebackup
  • Loading branch information
ettanany authored Nov 26, 2024
2 parents 31b289c + 58fd152 commit b93b132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pghoard/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,8 @@ def _get_basebackup(
os.chmod(dirname, 0o700)

# Based on limited samples, there could be one stalled download per 122GiB of transfer
# So we tolerate one stall for every 64GiB of transfer (or STALL_MIN_RETRIES for smaller backup)
stall_max_retries = max(STALL_MIN_RETRIES, int(int(metadata.get("total-size-enc", 0)) / (64 * 2 ** 30)))
# So we tolerate one stall for every 10GiB of transfer (or STALL_MIN_RETRIES for smaller backup)
stall_max_retries = max(STALL_MIN_RETRIES, int(int(metadata.get("total-size-enc", 0)) / (10 * 2 ** 30)))

fetcher = BasebackupFetcher(
app_config=self.config,
Expand Down

0 comments on commit b93b132

Please sign in to comment.