git prune - prune more aggresively - issue 5293#5359
Draft
wplapper wants to merge 4 commits intorestic:masterfrom
Draft
git prune - prune more aggresively - issue 5293#5359wplapper wants to merge 4 commits intorestic:masterfrom
wplapper wants to merge 4 commits intorestic:masterfrom
Conversation
Contributor
Author
|
I have decided to revert this PR to closed status to ease the pressure on the |
Changes: cmd_prune.go: removed option `--repack-small` and marked it deprecated. Add changelog note.
Additions: prune.go: created mapping of ``packsFromPackfiles`` so that the information on all packfiles can be re-used. Added function ``smallSizeEvaluation``which sorts the packfiles sizes and then picks a percentile value from the the sorted list. A scale factor will be apllied. If ``targetPackSize`` is smaller than the value returned from this function, it will be replaced. Added a test ``TestPrunePercentile`` in prune_test.go git prune - the linter caught me restic prune - prune.go - remove comments removed commented code which is not longer used
added some quiet boundary checks and comments used variables `percentIndex`, `rightmost` and `scaleFactor`. Updated PR number
cmd/restic/cmd_prune.go: introduced options `--percentile`and `--threshold` for easier change of defaults. MAde sure that boundaries are sound before handling over to repository.PlanPrune(). internal/repository/prune.go: integrated new options `--percentile`and `--threshold`. Set a minimum 'targetPackSize@ of 1 Mib to collect all smal packfiles.
Contributor
Author
|
This PR is getting out of sync with modern restic. Revert to Draft status. |
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.
Changes: cmd_prune.go: removed option
--repack-smalland marked it deprecated.Add changelog note.
Added code to filter out the processing of all packfiles early in the
pruneprocess, so that map can be reused for calculating atargetPackSizevalue based on the chosen percentile of the sorted packfiles list.Added test to validate modified prune behaviour.
What does this PR change? What problem does it solve?
This PR addresses the issue #5293.
Was the change previously discussed in an issue or on the forum?
#5293
closes #5293
Checklist
- [ ] I have added documentation for relevant changes (in the manual).changelog/unreleased/that describes the changes for our users (see template).