Skip to content

fix caching during bvfs_update#1138

Merged
pstorz merged 2 commits intobareos:masterfrom
arogge:dev/arogge/master/replace-bvfs-cache
Apr 4, 2022
Merged

fix caching during bvfs_update#1138
pstorz merged 2 commits intobareos:masterfrom
arogge:dev/arogge/master/replace-bvfs-cache

Conversation

@arogge
Copy link
Member

@arogge arogge commented Mar 24, 2022

This patch replaces the complicated pathid_cache based on htable with a
much simpler one based on std::unordered_set. It also changes the
interface to use uint64_t instead of char*.

This addresses a problem where htable broke when it grew, because the key-memory had been reused.

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: Backport of PR#000 to bareos-2x
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

@arogge
Copy link
Member Author

arogge commented Mar 24, 2022

Just for the record: I shot myself in the foot again with the compiler not being able to detect broken format-strings on Mmsg(). We really need to get that fixed!

@arogge arogge force-pushed the dev/arogge/master/replace-bvfs-cache branch from 94cef68 to 7107b63 Compare March 25, 2022 09:49
Copy link
Member

@pstorz pstorz 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!

@arogge arogge force-pushed the dev/arogge/master/replace-bvfs-cache branch from 7107b63 to 0c31a2b Compare March 28, 2022 08:50
@pstorz pstorz self-assigned this Mar 31, 2022
arogge added 2 commits April 4, 2022 11:40
This patch replaces the complicated pathid_cache based on htable with a
much simpler one based on std::unordered_set. It also changes the
interface to use uint64_t instead of char*
@pstorz pstorz force-pushed the dev/arogge/master/replace-bvfs-cache branch from 0c31a2b to 84e23ea Compare April 4, 2022 09:40
@pstorz pstorz merged commit 8bffdaf into bareos:master Apr 4, 2022
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.

2 participants