stored: fix blocksize warning#1503
Merged
BareosBot merged 5 commits intobareos:masterfrom Aug 1, 2023
Merged
Conversation
4c72b65 to
934437e
Compare
arogge
reviewed
Jul 13, 2023
arogge
reviewed
Jul 13, 2023
arogge
reviewed
Jul 13, 2023
arogge
reviewed
Jul 14, 2023
arogge
reviewed
Jul 14, 2023
Member
arogge
left a comment
There was a problem hiding this comment.
Looks good. Just one thing: you write "If such a warning is
emitted we also reset the value to its default value." in the description. But I cannot find the code doing this and I don't think that's the desired behaviour.
Contributor
Author
You are right. This was the case originally, but I reverted it because that feature is actually pretty useful for testing. |
arogge
approved these changes
Jul 14, 2023
410f0a3 to
11dc931
Compare
Instead of remembering the items by index, they are instead remembered by their name. This allows other parts of the code to easily query whether a member was set or not without having access to the list of resource items. This works since no two members of a class can have the same name.
Instead of checking for max_block_size > 0 instead check that the value was not set by the parser.
11dc931 to
625d6dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to the Bareos Project!
This PR changes the way that the parser saves which members it set itself.
Instead of remembering the items by index (from the resource item array),
they are instead remembered by the member name. This makes it easy for
other parts of the code to look up whether a member was set or not.
This is then used to only emit the block size warning if the block size was actually
set inside the configuration (regardless of what is was set to).
This PR also slightly alters the way that job control records are dumped during a crash.
Now the dumper reports how many jcrs got dumped in total and does not print redundant
information.
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)
Make sure you check/merge the PR using
devtools/pr-toolto have some simple automated checks run and a proper changelog record added.General
Source code quality
Tests