tka: compact TKA storage on startup

Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
Tom DNetto
2023-03-01 14:14:35 -08:00
committed by Tom
parent e2d652ec4d
commit 88c7d19d54
6 changed files with 250 additions and 5 deletions

View File

@@ -4740,6 +4740,9 @@ func (b *LocalBackend) initTKALocked() error {
if err != nil {
return fmt.Errorf("initializing tka: %v", err)
}
if err := authority.Compact(storage, tkaCompactionDefaults); err != nil {
b.logf("tka compaction failed: %v", err)
}
b.tka = &tkaState{
profile: cp.ID,