retention

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCommitNotFound = errors.New("commit not found")

Functions

func GetGarbageCollectionCommits

func GetGarbageCollectionCommits(ctx context.Context, startingPointIterator *GCStartingPointIterator, commitGetter *RepositoryCommitGetter, rules *graveler.GarbageCollectionRules) (map[graveler.CommitID]graveler.MetaRangeID, error)

GetGarbageCollectionCommits returns the sets of active commits, according to the repository's garbage collection rules. See https://github.com/treeverse/lakeFS/issues/1932 for more details. Upon completion, the given startingPointIterator is closed.

Types

type CommitNode added in v0.96.0

type CommitNode struct {
	CreationDate time.Time
	MainParent   graveler.CommitID
	MetaRangeID  graveler.MetaRangeID
}

func NewCommitNode added in v0.96.0

func NewCommitNode(creationDate time.Time, mainParent graveler.CommitID, metaRangeID graveler.MetaRangeID) CommitNode

type GCStartingPoint added in v0.45.1

type GCStartingPoint struct {
	BranchID graveler.BranchID
	CommitID graveler.CommitID
}

A GCStartingPoint represents a commit from which the GC algorithm should start scanning. It could be either a branch HEAD, or a dangling commit. The CommitID field is always set, while BranchID is set only if the commit is a branch HEAD.

type GCStartingPointIterator added in v0.45.1

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

GCStartingPointIterator combines a branch iterator and a commit iterator. Both are assumed to be sorted and to contain no duplicates. Each returned GCStartingPoint object contains the commit id. If the entry came from the branch iterator, it also contains the branch id. Commits appearing in both iterators appear only once and include the branch id. Closing this iterator will close the two internal iterators.

func NewGCStartingPointIterator added in v0.45.1

func NewGCStartingPointIterator(commitIterator graveler.CommitIterator, branchIterator graveler.BranchIterator) *GCStartingPointIterator

func (*GCStartingPointIterator) Close added in v0.45.1

func (sp *GCStartingPointIterator) Close()

func (*GCStartingPointIterator) Err added in v0.45.1

func (sp *GCStartingPointIterator) Err() error

func (*GCStartingPointIterator) Next added in v0.45.1

func (sp *GCStartingPointIterator) Next() bool

func (*GCStartingPointIterator) Value added in v0.45.1

type GarbageCollectionManager

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

func NewGarbageCollectionManager

func NewGarbageCollectionManager(blockAdapter block.Adapter, refManager graveler.RefManager, committedBlockStoragePrefix string) *GarbageCollectionManager

func (*GarbageCollectionManager) GetAddressesLocation added in v0.44.0

func (m *GarbageCollectionManager) GetAddressesLocation(sn graveler.StorageNamespace) (string, error)

func (*GarbageCollectionManager) GetCommitsCSVLocation added in v0.44.0

func (m *GarbageCollectionManager) GetCommitsCSVLocation(runID string, sn graveler.StorageNamespace) (string, error)

func (*GarbageCollectionManager) GetRules

func (*GarbageCollectionManager) GetUncommittedLocation added in v0.85.0

func (m *GarbageCollectionManager) GetUncommittedLocation(runID string, sn graveler.StorageNamespace) (string, error)

GetUncommittedLocation return full path to underlying storage path to store uncommitted information

func (*GarbageCollectionManager) NewID added in v0.85.0

func (m *GarbageCollectionManager) NewID() string

func (*GarbageCollectionManager) SaveGarbageCollectionCommits

func (m *GarbageCollectionManager) SaveGarbageCollectionCommits(ctx context.Context, repository *graveler.RepositoryRecord, rules *graveler.GarbageCollectionRules) (string, error)

func (*GarbageCollectionManager) SaveGarbageCollectionUncommitted added in v0.85.0

func (m *GarbageCollectionManager) SaveGarbageCollectionUncommitted(ctx context.Context, repository *graveler.RepositoryRecord, filename, runID string) error

func (*GarbageCollectionManager) SaveRules

type RepositoryCommitGetter

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

func (*RepositoryCommitGetter) ListCommits added in v0.96.0

Jump to

Keyboard shortcuts

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