Documentation ¶
Index ¶
- Constants
- Variables
- func GetDeleteCandidateChain(r *replica.Replica, checkpoint string) ([]string, error)
- type SnapList
- type Task
- func (t *Task) AddQuorumReplica(replicaAddress string, _ *replica.Server) error
- func (t *Task) AddReplica(replicaAddress string, s *replica.Server) error
- func (t *Task) CloneReplica(s *replica.Server, url string, address string, cloneIP string, snapName string) error
- func (t *Task) CreateBackup(snapshot, dest string) (string, error)
- func (t *Task) DeleteSnapshot(snapshot string) error
- func (t *Task) InspectBackup(backup string) (string, error)
- func (t *Task) InternalSnapshotCleaner(s *replica.Server, repClient *replicaClient.ReplicaClient)
- func (t *Task) ListBackup(destURL string) (string, error)
- func (t *Task) RestoreBackup(backup string) error
- func (t *Task) RmBackup(backup string) error
Constants ¶
const (
SnapshotDeletionInterval = 60 * time.Second
)
Variables ¶
var ( RetryCounts = 3 SnapshotRetentionCount = 10 )
Functions ¶
func GetDeleteCandidateChain ¶ added in v1.12.1
GetDeleteCandidateChain returns the chain of snapshots that can be deleted Chain is sorted based on the snapshot size before returning All the snapshots in the chain are returned except: 1. Head snapshot 2. Last snapshot, snapshot just below head 3. Base snapshot 4. User created snapshots not marked as removed
Types ¶
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) AddQuorumReplica ¶
func (*Task) CloneReplica ¶
func (*Task) DeleteSnapshot ¶
func (*Task) InternalSnapshotCleaner ¶ added in v1.12.1
func (t *Task) InternalSnapshotCleaner(s *replica.Server, repClient *replicaClient.ReplicaClient)
InternalSnapshotCleaner should be run in the background, it tries to delete a snapshot every 60s It fetches the checkpoint from controller which is present at in-memory of controller. If checkpoint is not available at controller, snapshot delete is not initiated. A deletion candidate list is prepared In each iteration of the loop, one snapshot is picked from the top and deleted.