Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(general): upstream bump up for 1.15 #19

Merged

Conversation

Lyndon-Li
Copy link
Collaborator

Merge upstream commits for critical issue fixes and performance improvements:
kopia#4003
kopia#4084
kopia#4139
kopia#4167

julio-lopez and others added 4 commits October 16, 2024 11:07
Followups to kopia#3655

* wrap fs.Reader
* nit: remove unnecessary intermediate variable
* nit: rename local variable
* cleanup: move restore.Progress interface to cli pkg
* move cliRestoreProgress to a separate file
* refactor(general): replace switch with if/else for clarity
  Removes a tautology for `err == nil`, which was guaranteed
  to be true in the second case statement for the switch.
  Replacing the switch statement with and if/else block is clearer.
* initialize restoreProgress in restore command
* fix: use error.Wrapf with format string and args


Simplify SetCounters signature:

Pass arguments in a `restore.Stats` struct.
  `SetCounters(s restore.Stats)`
Simplifies call sites and implementation.
In this case it makes sense to pass all the values
using the restore.Stats struct as it simplifies
the calls.
However, this pattern should be avoided in general
as it essentially makes all the arguments "optional".
This makes it easy to miss setting a value and simply
passing 0 (the default value), thus it becomes error
prone.
In this particular case, the struct is being passed
through verbatim, thus eliminating the risk of
missing a value, at least in the current state of
the code.
…ction (kopia#4084)

* Change struct for tracking committed content

Committed content only ever has a value of 'true' for committed so use
an empty struct and an existance check instead.

* Don't copy committed manifest set for compaction

Assuming the number of committed manifests is much larger than the
number of manifest updates, it seems reasonable to update the logic to
write manifests out to not delete entries from the set being operated
on. Doing so allows us to avoid creating a duplicate of the set of all
committed manifests during compaction, which could also save some memory
as the temporary map wasn't being right-sized based on the the number of
committed entries. This also works because writing data either fails or
succeeds completely. That means there's no possibility of only some
entries being written out but not others, which means callers can use
the presence of an error to determine how to react (i.e. clear pending
set).

* Benchmarks for compaction
…opia#4139)

* index builder for epoch index compaction

* index builder for epoch index compaction: fix CI errors

* index builder for epoch index compaction: UT for OneUseBuilder

* index builder for epoch index compaction: fix CI errors

* index builder for epoch index compaction: use *Info as builder item

* index builder for epoch index compaction: fix CI errors

* index builder for epoch index compaction: fix CI errors

* index builder for epoch index compaction: fix CI errors
@Lyndon-Li Lyndon-Li merged commit 939dae5 into project-velero:v0.17.0-velero-patch Oct 16, 2024
8 checks passed
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.

4 participants