mirror of
https://github.com/tailscale/tailscale.git
synced 2026-04-21 05:21:12 +02:00
Updates #cleanup Change-Id: Ib5e481d5a9c7ec7ac3e6b3913909ab1bf21d7a4d Signed-off-by: Alex Chan <alexc@tailscale.com>
36 lines
931 B
Go
36 lines
931 B
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package tka
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
// Upper bound on checkpoint elements, chosen arbitrarily. Intended
|
|
// to cap the size of large AUMs.
|
|
maxDisablementSecrets = 32
|
|
maxKeys = 512
|
|
|
|
// Max amount of metadata that can be associated with a key, chosen arbitrarily.
|
|
// Intended to avoid people abusing TKA as a key-value score.
|
|
maxMetaBytes = 512
|
|
|
|
// Max iterations searching for any intersection during the sync process.
|
|
maxSyncIter = 2000
|
|
|
|
// Max iterations searching for a head intersection during the sync process.
|
|
maxSyncHeadIntersectionIter = 400
|
|
|
|
// Limit on scanning AUM trees, chosen arbitrarily.
|
|
maxScanIterations = 2000
|
|
)
|
|
|
|
var (
|
|
CompactionDefaults = CompactionOptions{
|
|
MinChain: 24, // Keep at minimum 24 AUMs since head.
|
|
MinAge: 14 * 24 * time.Hour, // Keep 2 weeks of AUMs.
|
|
}
|
|
)
|