util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteDeleteRange

func CompleteDeleteRange(ctx context.Context, dr DelRangeTask) error

CompleteDeleteRange deletes a record from gc_delete_range table. NOTE: This function WILL NOT start and run in a new transaction internally.

func UpdateDeleteRange

func UpdateDeleteRange(ctx context.Context, dr DelRangeTask, newStartKey, oldStartKey kv.Key) error

UpdateDeleteRange is only for emulator.

Types

type DelRangeTask

type DelRangeTask struct {
	JobID, ElementID int64
	StartKey, EndKey []byte
}

DelRangeTask is for run delete-range command in gc_worker.

func LoadDeleteRanges

func LoadDeleteRanges(ctx context.Context, safePoint uint64) (ranges []DelRangeTask, _ error)

LoadDeleteRanges loads delete range tasks from gc_delete_range table.

func (DelRangeTask) Range

func (t DelRangeTask) Range() ([]byte, []byte)

Range returns the range [start, end) to delete.

Jump to

Keyboard shortcuts

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