gcworker

package
v2.1.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGCWorker

func NewGCWorker(store tikv.Storage) (tikv.GCHandler, error)

NewGCWorker creates a GCWorker instance.

func RunGCJob

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.

Types

type GCWorker

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

GCWorker periodically triggers GC process on tikv server.

func (*GCWorker) Close

func (w *GCWorker) Close()

Close stops background goroutines.

func (*GCWorker) Start

func (w *GCWorker) Start()

Start starts the worker.

type MockGCWorker

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

MockGCWorker is for test.

func NewMockGCWorker

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

NewMockGCWorker creates a MockGCWorker instance ONLY for test.

func (*MockGCWorker) DeleteRanges

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

DeleteRanges call deleteRanges internally, just for test.

Jump to

Keyboard shortcuts

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