gc

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NextChecksIntervals = []time.Duration{time.Second, checkTablesReentryMinInterval + 5*time.Second}
)

Functions

This section is empty.

Types

type Status added in v0.15.0

type Status struct {
	Keyspace string
	Shard    string

	IsOpen bool
	// contains filtered or unexported fields
}

Status published some status values 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, 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) RequestChecks added in v0.19.0

func (collector *TableGC) RequestChecks()

RequestChecks requests that the GC will do a table check right away, as well as in a few seconds. Calling this function is useful to modules that are performing operations that affect GC tables. Those modules _know_ that changes have been made, and now have a way to tell TableGC: "please take a look asap rather than in the next hour".

func (*TableGC) Status

func (collector *TableGC) Status() *Status

Status exports a status breakdown

Jump to

Keyboard shortcuts

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