sync

package
v1.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SnapshotDeletionInterval = 60 * time.Second
)

Variables

View Source
var (
	RetryCounts            = 3
	SnapshotRetentionCount = 10
)

Functions

func GetDeleteCandidateChain added in v1.12.1

func GetDeleteCandidateChain(r *replica.Replica, checkpoint string) ([]string, error)

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 SnapList added in v1.12.1

type SnapList struct {
	// contains filtered or unexported fields
}

type Task

type Task struct {
	// contains filtered or unexported fields
}

func NewTask

func NewTask(controller string) *Task

func (*Task) AddQuorumReplica

func (t *Task) AddQuorumReplica(replicaAddress string, _ *replica.Server) error

func (*Task) AddReplica

func (t *Task) AddReplica(replicaAddress string, s *replica.Server) error

func (*Task) CloneReplica

func (t *Task) CloneReplica(s *replica.Server, url string, address string, cloneIP string, snapName string) error

func (*Task) CreateBackup

func (t *Task) CreateBackup(snapshot, dest string) (string, error)

func (*Task) DeleteSnapshot

func (t *Task) DeleteSnapshot(snapshot string) error

func (*Task) InspectBackup

func (t *Task) InspectBackup(backup string) (string, error)

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.

func (*Task) ListBackup

func (t *Task) ListBackup(destURL string) (string, error)

func (*Task) RestoreBackup

func (t *Task) RestoreBackup(backup string) error

func (*Task) RmBackup

func (t *Task) RmBackup(backup string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL