summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAlex Chan <alexc@tailscale.com>2026-04-10 17:00:49 +0100
committerAlex Chan <alex@alexwlchan.net>2026-04-10 17:13:23 +0100
commit399f0483321ac36d9e536cf12907c5ee42fe3ef9 (patch)
tree9ee0184937ff83b0d4b266473d7d00c860bcabd7
parent1ff369a26119a9a5d421fdd9b05406f12e73919f (diff)
downloadtailscale-399f0483321ac36d9e536cf12907c5ee42fe3ef9.tar.xz
tailscale-399f0483321ac36d9e536cf12907c5ee42fe3ef9.zip
tka: Revert "improve logging for Compact and Commit operations"
This reverts commit b25920dfc07452833895ad00b42db7e581b3cec8. The `log.Printf` messages are causing panics in corp, in particular: > panic: please use tailscale.com/logger.Logf instead of the log package Fixing the TKA code to plumb through a logger properly is going to be a hassle, so for now remove these logs to unblock merges to corp. Updates tailscale/corp#39455 Signed-off-by: Alex Chan <alexc@tailscale.com>
-rw-r--r--tka/tailchonk.go6
-rw-r--r--tka/tka.go7
2 files changed, 0 insertions, 13 deletions
diff --git a/tka/tailchonk.go b/tka/tailchonk.go
index da1915acb..3b083f327 100644
--- a/tka/tailchonk.go
+++ b/tka/tailchonk.go
@@ -597,9 +597,6 @@ func (c *FS) CommitVerifiedAUMs(updates []AUM) error {
for i, aum := range updates {
h := aum.Hash()
err := c.commit(h, func(info *fsHashInfo) {
- if info.PurgedUnix > 0 {
- log.Printf("tka: CommitVerifiedAUMs: committing previously-deleted AUM %s", h.String())
- }
info.PurgedUnix = 0 // just in-case it was set for some reason
info.AUM = &aum
})
@@ -976,8 +973,5 @@ func Compact(storage CompactableChonk, head AUMHash, opts CompactionOptions) (la
if err := storage.SetLastActiveAncestor(lastActiveAncestor); err != nil {
return AUMHash{}, err
}
- if len(toDelete) > 0 {
- log.Printf("tka compaction: purging %d AUM(s) [%q]", len(toDelete), toDelete)
- }
return lastActiveAncestor, storage.PurgeAUMs(toDelete)
}
diff --git a/tka/tka.go b/tka/tka.go
index 57a8bd122..9b22edc2e 100644
--- a/tka/tka.go
+++ b/tka/tka.go
@@ -10,7 +10,6 @@ import (
"bytes"
"errors"
"fmt"
- "log"
"os"
"sort"
@@ -557,8 +556,6 @@ func Bootstrap(storage Chonk, bootstrap AUM) (*Authority, error) {
// Everything looks good, write it to storage.
if err := storage.CommitVerifiedAUMs([]AUM{bootstrap}); err != nil {
return nil, fmt.Errorf("commit: %v", err)
- } else {
- log.Printf("tka.Bootstrap: successfully committed bootstrap AUM (%s)", bootstrap.Hash())
}
if err := storage.SetLastActiveAncestor(bootstrap.Hash()); err != nil {
return nil, fmt.Errorf("set ancestor: %v", err)
@@ -590,7 +587,6 @@ func (a *Authority) InformIdempotent(storage Chonk, updates []AUM) (Authority, e
}
stateAt := make(map[AUMHash]State, len(updates)+1)
toCommit := make([]AUM, 0, len(updates))
- toCommitHashes := make([]AUMHash, 0, len(updates))
prevHash := a.Head()
// The state at HEAD is the current state of the authority. It's likely
@@ -640,13 +636,10 @@ func (a *Authority) InformIdempotent(storage Chonk, updates []AUM) (Authority, e
}
prevHash = hash
toCommit = append(toCommit, update)
- toCommitHashes = append(toCommitHashes, update.Hash())
}
if err := storage.CommitVerifiedAUMs(toCommit); err != nil {
return Authority{}, fmt.Errorf("commit: %v", err)
- } else {
- log.Printf("tka.CommitVerifiedAUMs: successfully committed %d AUMs: %v", len(toCommit), toCommitHashes)
}
if isHeadChain {