Aiven-Open / pghoard

PostgreSQL® backup and restore service
http://aiven-open.github.io/pghoard/
Apache License 2.0
1.3k stars 99 forks source link

fix: Reduce the stalled logging for snapshot #625

Closed sebinsunny closed 1 week ago

sebinsunny commented 1 week ago

Reduce the stalled logging for the snapshot process. Previously, we were not resetting last_flush_time, resulting in a lot of logs being printed if the previous base backup failed and the current progress surpassed the previous base backup progress for the snapshot process

About this change - What it does

Resolves: #xxxxx

Why this way

codecov-commenter commented 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.70%. Comparing base (5505b86) to head (a9c631a). Report is 13 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Aiven-Open/pghoard/pull/625/graphs/tree.svg?width=650&height=150&src=pr&token=nLr7M7hvCx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aiven-Open)](https://app.codecov.io/gh/Aiven-Open/pghoard/pull/625?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aiven-Open) ```diff @@ Coverage Diff @@ ## main #625 +/- ## ========================================== - Coverage 91.01% 90.70% -0.32% ========================================== Files 31 31 Lines 4917 4957 +40 ========================================== + Hits 4475 4496 +21 - Misses 442 461 +19 ``` | [Files](https://app.codecov.io/gh/Aiven-Open/pghoard/pull/625?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aiven-Open) | Coverage Δ | | |---|---|---| | [pghoard/basebackup/delta.py](https://app.codecov.io/gh/Aiven-Open/pghoard/pull/625?src=pr&el=tree&filepath=pghoard%2Fbasebackup%2Fdelta.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aiven-Open#diff-cGdob2FyZC9iYXNlYmFja3VwL2RlbHRhLnB5) | `90.51% <0.00%> (-0.70%)` | :arrow_down: | ... and [9 files with indirect coverage changes](https://app.codecov.io/gh/Aiven-Open/pghoard/pull/625/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Aiven-Open)