mirror of
https://github.com/restic/restic.git
synced 2025-10-10 08:13:16 +00:00
repository: Increase index size for repo version 2
A compressed index is only about one third the size of an uncompressed one. Thus increase the number of entries in an index to avoid cluttering the repository with small indexes.
This commit is contained in:
@@ -698,6 +698,9 @@ func (r *Repository) SearchKey(ctx context.Context, password string, maxKeys int
|
||||
} else if err != nil {
|
||||
return errors.Fatalf("config cannot be loaded: %v", err)
|
||||
}
|
||||
if r.Config().Version >= 2 {
|
||||
r.idx.markCompressed()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user