fix miscalculation when using Always Incremental Keep Number#1159
fix miscalculation when using Always Incremental Keep Number#1159pstorz merged 5 commits intobareos:masterfrom
Conversation
pstorz
left a comment
There was a problem hiding this comment.
Other than the title/changelog entry: Good work!
| - webui: get volume and pool params from query instead of route [PR #1139] | ||
| - FreeBSD packages: add missing ddl/update 2171_2192 and 2192_2210 files [PR #1147] | ||
| - Fix director connects to client while `Connection From Director To Client` is disabled. [PR #1099] | ||
| - dir: miscalculation when using `always incremental keep number` [PR #1159] |
There was a problem hiding this comment.
This is a bit too broad, maybe "miscalculation when always incremental keep number is greater than the number of backups determined by always incremental job retention
There was a problem hiding this comment.
it is hard to describe in a meaningful way, thus I settled with that I have, so people see that there is something wrong when they use always incremental keep number.
I can, of course, go more into detail here. Maybe we describe the complete problem in the PR description - the Changelog will link to that for people who are really interested in what's going on.
There was a problem hiding this comment.
@pstorz it is also true for ai keep number = ai job retention Failure occur with this configuration.
Always Incremental Job Retention = 28 days
Always Incremental Keep Number = 28 days
Always Incremental Max Full Age = 32 days
d344168 to
a408615
Compare
This fixes a bug where the number of incrementals was miscalculated during consolidation leading to no consolidation when "Keep Number" was set. The patch also makes a lot of the variables `const` and tries to avoid re-use of existing variables to improve readability.
... and try to improve readability even more.
a408615 to
e9341db
Compare
When changing consolidation to remove zero-file-jobs, we introduced a bug by recalculating the number of existing incrementals wrong.
This PR fixes that problem and refactors the code to make it clearer so that such bugs will be less likely to occur in the future.
Thank you for contributing to the Bareos Project!
Please check
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
General
Source code quality
bareos-check-sources --since-mergedoes not report any problemsgit statusshould not report modifications in the source tree after building and testing