retention

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 GarbageCollectionCommits

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

func GetGarbageCollectionCommits

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

GetGarbageCollectionCommits returns the sets of expired and 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.

type GarbageCollectionManager

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

func NewGarbageCollectionManager

func NewGarbageCollectionManager(db db.Database, 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) GetRunExpiredCommits

func (m *GarbageCollectionManager) GetRunExpiredCommits(ctx context.Context, storageNamespace graveler.StorageNamespace, runID string) ([]graveler.CommitID, error)

func (*GarbageCollectionManager) SaveGarbageCollectionCommits

func (m *GarbageCollectionManager) SaveGarbageCollectionCommits(ctx context.Context, storageNamespace graveler.StorageNamespace, repositoryID graveler.RepositoryID, rules *graveler.GarbageCollectionRules, previouslyExpiredCommits []graveler.CommitID) (string, error)

func (*GarbageCollectionManager) SaveRules

type RepositoryCommitGetter

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

func (*RepositoryCommitGetter) GetCommit

func (r *RepositoryCommitGetter) GetCommit(ctx context.Context, commitID graveler.CommitID) (*graveler.Commit, error)

Jump to

Keyboard shortcuts

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