Aiven-Open / pghoard

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

Use correct label when performing chunked basebackup #588

Closed nicois closed 1 year ago

nicois commented 1 year ago

Chunked basebackups are used by both delta and non-delta basebackups. Take this into account when allocating a label to the metric used to track the number of bytes uploaded.

The code path of using chunks in delta did not explicitly include delta argument, and also did not pass in delta_stats.

codecov[bot] commented 1 year ago

Codecov Report

Merging #588 (2c9c937) into main (b1e987a) will decrease coverage by 0.03%. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/aiven/pghoard/pull/588/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)](https://app.codecov.io/gh/aiven/pghoard/pull/588?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven) ```diff @@ Coverage Diff @@ ## main #588 +/- ## ========================================== - Coverage 91.33% 91.30% -0.03% ========================================== Files 32 32 Lines 4683 4683 ========================================== - Hits 4277 4276 -1 - Misses 406 407 +1 ``` | [Impacted Files](https://app.codecov.io/gh/aiven/pghoard/pull/588?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven) | Coverage Δ | | |---|---|---| | [pghoard/basebackup/base.py](https://app.codecov.io/gh/aiven/pghoard/pull/588?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven#diff-cGdob2FyZC9iYXNlYmFja3VwL2Jhc2UucHk=) | `92.25% <ø> (ø)` | | | [pghoard/basebackup/delta.py](https://app.codecov.io/gh/aiven/pghoard/pull/588?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven#diff-cGdob2FyZC9iYXNlYmFja3VwL2RlbHRhLnB5) | `95.93% <ø> (ø)` | | | [pghoard/basebackup/chunks.py](https://app.codecov.io/gh/aiven/pghoard/pull/588?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven#diff-cGdob2FyZC9iYXNlYmFja3VwL2NodW5rcy5weQ==) | `96.83% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/aiven/pghoard/pull/588/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiven)