Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consolidate: purge jobids without files before starting the consolidation #1107

Merged
merged 7 commits into from Mar 9, 2022

Conversation

pstorz
Copy link
Member

@pstorz pstorz commented Mar 8, 2022

Backport of PR #1056 to bareos-21

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

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
  • PR name is meaningful
  • Purpose of the PR is understood
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
  • If backport: add original PR number and target branch at top of this file: ***
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
  • bareos-check-sources --since-merge does not report any problems
  • git status should not report modifications in the source tree after building and testing
Tests
  • Decision taken that a system- or unittest is required (if not, then remove this paragraph)
  • The decision towards a systemtest is reasonable compared to a unittest
  • Testname matches exactly what is being tested
  • Output of the test leads quickly to the origin of the fault

pstorz and others added 4 commits March 8, 2022 08:59
in case of PGRES_FATAL_ERROR
Verify that empty jobs are purged before consolidation starts.
This patch refactors functions to purge files and jobs and to upgrade
copy jobs to backup jobs so they can be called without an UaContext.
Previously empty jobs (i.e. those with JobFiles == 0) were left
untouched by consolidation. This change now adds functionality that will
identify these jobs and purge them so the result looks like they had
been consolidated, too.
@pstorz pstorz changed the base branch from master to bareos-21 March 8, 2022 08:17
@pstorz pstorz force-pushed the dev/pstorz/bareos-21/backport-1056 branch from d121681 to d12739a Compare March 8, 2022 08:28
@pstorz pstorz self-assigned this Mar 8, 2022
@pstorz pstorz requested a review from arogge March 8, 2022 08:28
Copy link
Member

@arogge arogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. If CI passes, we should merge it

@pstorz pstorz merged commit 88d95d8 into bareos-21 Mar 9, 2022
@pstorz pstorz deleted the dev/pstorz/bareos-21/backport-1056 branch March 9, 2022 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants