Skip to content

Improve handling of catalog requests that try to reduce VolFiles, VolBlocks and VolBytes#1431

Merged
arogge merged 3 commits intomasterfrom
dev/pstorz/master/fix-volfiles-reduce-problem
Jun 1, 2023
Merged

Improve handling of catalog requests that try to reduce VolFiles, VolBlocks and VolBytes#1431
arogge merged 3 commits intomasterfrom
dev/pstorz/master/fix-volfiles-reduce-problem

Conversation

@pstorz
Copy link
Member

@pstorz pstorz commented Apr 3, 2023

We have the effect that at the end of restores, we get catalog requests that try to reduce the VolFiles.
Instead of emitting a fatal error, we now log the event and keep the current value.

We do the same for VolBytes and for VolBlocks.

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)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Required backport PRs have been created
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

@pstorz pstorz force-pushed the dev/pstorz/master/fix-volfiles-reduce-problem branch from 268d18a to 365c5ee Compare April 3, 2023 13:56
@pstorz pstorz marked this pull request as draft April 6, 2023 10:41
@bruno-at-bareos bruno-at-bareos requested a review from arogge April 20, 2023 10:09
@bruno-at-bareos bruno-at-bareos marked this pull request as ready for review April 20, 2023 10:17
@bruno-at-bareos
Copy link
Contributor

We highly suspect that while a restore is scheduled the information about the volume is retrieved from the database, and bsr is written. The restore maybe is waiting previous jobs to free the media.
This need to be checked into a systemtest.

@bruno-at-bareos
Copy link
Contributor

It look like we found the root cause, and we should be able to reproduce in a test the case.
Do a full on a media, and setup incremental to goes to same media, run a incremental with a sleep time and at the same time schedule a restore of the previous job.
The restore will have its data loaded from the database, but before it start, the media will get changes.

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.

This is a good first step finding and fixing the underlying issue.

@arogge arogge changed the title catreq.cc: handle requests to reduce VolFiles Improve handling of catalog requests that try to reduce VolFiles, VolBlocks and VolBytes May 23, 2023
pstorz added 2 commits June 1, 2023 13:30
We have the effect that at the end of restores, we get catalog requests
that try to reduce the VolFiles.
Instead of emitting a fatal error, we now log the event and keep the
current value.

We do the same for VolBytes and for VolBlocks.
- Remove second unused parameter
- Define enum type for first parameter (is_labeloperation)
@arogge arogge force-pushed the dev/pstorz/master/fix-volfiles-reduce-problem branch from 9359472 to 60c53ef Compare June 1, 2023 11:31
@arogge arogge merged commit 7baed28 into master Jun 1, 2023
@arogge arogge deleted the dev/pstorz/master/fix-volfiles-reduce-problem branch June 1, 2023 11:32
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.

3 participants