Skip to content

avoid orphan content chunks (master) - #7349

Merged
ThomasWaldmann merged 5 commits into
borgbackup:masterfrom
ThomasWaldmann:avoid-orphan-content-chunks3
Feb 13, 2023
Merged

avoid orphan content chunks (master)#7349
ThomasWaldmann merged 5 commits into
borgbackup:masterfrom
ThomasWaldmann:avoid-orphan-content-chunks3

Conversation

@ThomasWaldmann

@ThomasWaldmann ThomasWaldmann commented Feb 12, 2023

Copy link
Copy Markdown
Member

I noticed that #7310 only solves part of the problem, because we incref chunks at other places, too, and we need to cleanup these also in case some exception happens.

Also, we might have exceptions between writing the chunks and writing the metadata item referencing them.

@codecov-commenter

codecov-commenter commented Feb 12, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7349 (a827af3) into master (4e17391) will decrease coverage by 0.10%.
The diff coverage is 80.23%.

❗ Current head a827af3 differs from pull request most recent head ac85946. Consider uploading reports for the commit ac85946 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master    #7349      +/-   ##
==========================================
- Coverage   84.01%   83.91%   -0.10%     
==========================================
  Files          67       67              
  Lines       11678    11687       +9     
  Branches     2124     2125       +1     
==========================================
- Hits         9811     9807       -4     
- Misses       1306     1319      +13     
  Partials      561      561              
Impacted Files Coverage Δ
src/borg/archive.py 84.47% <80.23%> (-0.60%) ⬇️
src/borg/archiver/create_cmd.py 78.48% <0.00%> (-0.95%) ⬇️
src/borg/helpers/parseformat.py 90.68% <0.00%> (-0.08%) ⬇️
src/borg/constants.py 100.00% <0.00%> (ø)
src/borg/platform/base.py 81.45% <0.00%> (+1.61%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ThomasWaldmann
ThomasWaldmann marked this pull request as draft February 12, 2023 19:12
@ThomasWaldmann
ThomasWaldmann force-pushed the avoid-orphan-content-chunks3 branch from 35f5984 to 8db3b39 Compare February 12, 2023 19:13
@ThomasWaldmann
ThomasWaldmann force-pushed the avoid-orphan-content-chunks3 branch from a827af3 to ac85946 Compare February 13, 2023 17:24
@ThomasWaldmann
ThomasWaldmann marked this pull request as ready for review February 13, 2023 19:35
we do book-keeping in item.chunks:
in case something goes wrong and we need to clean up,
we will have a list with chunks to decref in item.chunks.

also:
- make variable naming more consistent
- cosmetic changes
…case of exceptions

Note: no changes inside the indented block,
just added the try and the except block.
@ThomasWaldmann
ThomasWaldmann force-pushed the avoid-orphan-content-chunks3 branch from ac85946 to 71f8dd3 Compare February 13, 2023 19:47
@ThomasWaldmann
ThomasWaldmann merged commit 3849ebe into borgbackup:master Feb 13, 2023
@ThomasWaldmann
ThomasWaldmann deleted the avoid-orphan-content-chunks3 branch February 13, 2023 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants