restore: slightly reduce memory usage while restoring files
The information which target files are contained in a pack file is no longer necessary after processing a pack.
This commit is contained in:
parent
22562d2132
commit
94cbc6392d
1 changed files with 2 additions and 0 deletions
|
@ -181,6 +181,8 @@ func (r *fileRestorer) restoreFiles(ctx context.Context) error {
|
||||||
wg.Go(func() error {
|
wg.Go(func() error {
|
||||||
for _, id := range packOrder {
|
for _, id := range packOrder {
|
||||||
pack := packs[id]
|
pack := packs[id]
|
||||||
|
// allow garbage collection of packInfo
|
||||||
|
delete(packs, id)
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return ctx.Err()
|
return ctx.Err()
|
||||||
|
|
Loading…
Reference in a new issue