bootstrap

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrapper

type Bootstrapper interface {
	// Bootstrap creates some internal databases and tables at the time of MO
	Bootstrap(ctx context.Context) error
}

Bootstrapper is used to create some internal databases and tables at the time of MO initialization according to a specific logic. It provides the necessary dependencies for other components to be launched later.

Note that, this bootstrapper is not used to bootstrap logservice and dn. The internal databases and tables as below: 1. mo_indexes in mo_catalog 2. task inferstructure database

func NewBootstrapper

func NewBootstrapper(
	lock Locker,
	clock clock.Clock,
	client client.TxnClient,
	exec executor.SQLExecutor) Bootstrapper

NewBootstrapper create bootstrapper to bootstrap mo database

type Locker

type Locker interface {
	// Get return true means get lock
	Get(ctx context.Context) (bool, error)
}

Locker locker is used to get lock to bootstrap. Only one cn can get lock to bootstrap. Other cns need to wait bootstrap completed.

Jump to

Keyboard shortcuts

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