tidb: github.com/pingcap/tidb/store/tikv/gcworker Index | Files

package gcworker

import "github.com/pingcap/tidb/store/tikv/gcworker"

Index

Package Files

gc_worker.go

func NewGCWorker Uses

func NewGCWorker(store tikv.Storage, pdClient pd.Client) (tikv.GCHandler, error)

NewGCWorker creates a GCWorker instance.

func RunDistributedGCJob Uses

func RunDistributedGCJob(ctx context.Context, s tikv.Storage, pd pd.Client, safePoint uint64, identifier string, concurrency int) error

RunDistributedGCJob notifies TiKVs to do GC. It is exported for kv api, do not use it with GCWorker at the same time. This function may not finish immediately because it may take some time to do resolveLocks. Param concurrency specifies the concurrency of resolveLocks phase.

func RunGCJob Uses

func RunGCJob(ctx context.Context, s tikv.Storage, safePoint uint64, identifier string, concurrency int) error

RunGCJob sends GC command to KV. It is exported for kv api, do not use it with GCWorker at the same time.

type GCWorker Uses

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

GCWorker periodically triggers GC process on tikv server.

func (*GCWorker) Close Uses

func (w *GCWorker) Close()

Close stops background goroutines.

func (*GCWorker) Start Uses

func (w *GCWorker) Start()

Start starts the worker.

type MockGCWorker Uses

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

MockGCWorker is for test.

func NewMockGCWorker Uses

func NewMockGCWorker(store tikv.Storage) (*MockGCWorker, error)

NewMockGCWorker creates a MockGCWorker instance ONLY for test.

func (*MockGCWorker) DeleteRanges Uses

func (w *MockGCWorker) DeleteRanges(ctx context.Context, safePoint uint64) error

DeleteRanges calls deleteRanges internally, just for test.

Package gcworker imports 26 packages (graph) and is imported by 10 packages. Updated 2019-08-20. Refresh now. Tools for package owners.