gc

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCStatus

type GCStatus struct {
	Keyspace string
	Shard    string

	IsOpen bool
	// contains filtered or unexported fields
}

GCStatus published some status valus from the collector

type TableGC

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

TableGC is the main entity in the table garbage collection mechanism. This service "garbage collects" tables: - it checks for magically-named tables (e.g. _vt_EVAC_f6338b2af8af11eaa210f875a4d24e90_20200920063522) - it analyzes a table's state from its name - it applies operations on the table (namely purge for PURGE tables) - when due time, it transitions a table (via RENAME TABLE) to the next state - finally, it issues a DROP TABLE The sequence of steps is controlled by the command line variable -table_gc_lifecycle

func NewTableGC

func NewTableGC(env tabletenv.Env, ts *topo.Server, tabletTypeFunc func() topodatapb.TabletType, lagThrottler *throttle.Throttler) *TableGC

NewTableGC creates a table collector

func (*TableGC) Close

func (collector *TableGC) Close()

Close frees resources

func (*TableGC) InitDBConfig

func (collector *TableGC) InitDBConfig(keyspace, shard, dbName string)

InitDBConfig initializes keyspace and shard

func (*TableGC) Open

func (collector *TableGC) Open() (err error)

Open opens database pool and initializes the schema

func (*TableGC) Operate

func (collector *TableGC) Operate(ctx context.Context)

Operate is the main entry point for the table garbage collector operation and logic.

func (*TableGC) Status

func (collector *TableGC) Status() *GCStatus

Status exports a status breakdown

Jump to

Keyboard shortcuts

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