sharding

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// InsertTabletTemplateKsID common insert format to be used for different tests
	InsertTabletTemplateKsID = `insert into %s (id, msg) values (%d, '%s') /* id:%d */`
)

Functions

func CheckBinlogPlayerVars

func CheckBinlogPlayerVars(t *testing.T, vttablet cluster.Vttablet, sourceShards []string, secondBehindMaster int64)

CheckBinlogPlayerVars Checks the binlog player variables are correctly exported.

func CheckBinlogServerVars

func CheckBinlogServerVars(t *testing.T, vttablet cluster.Vttablet, minStatement int, minTxn int, isVerticalSplit bool)

CheckBinlogServerVars checks the binlog server variables are correctly exported.

func CheckDestinationMaster

func CheckDestinationMaster(t *testing.T, vttablet cluster.Vttablet, sourceShards []string, ci cluster.LocalProcessCluster)

CheckDestinationMaster performs multiple checks on a destination master.

func CheckLotsTimeout

func CheckLotsTimeout(t *testing.T, vttablet cluster.Vttablet, count uint64, table string, ks string, keyType querypb.Type, pctFound int) bool

CheckLotsTimeout waits till all values are inserted

func CheckShardQueryService

func CheckShardQueryService(t *testing.T, ci cluster.LocalProcessCluster, cell string, keyspaceName string,
	shardName string, tabletType topodata.TabletType, expectedState bool)

CheckShardQueryService checks DisableQueryService in the shard record's TabletControlMap.

func CheckShardQueryServices

func CheckShardQueryServices(t *testing.T, ci cluster.LocalProcessCluster, shards []cluster.Shard, cell string,
	keyspaceName string, tabletType topodata.TabletType, expectedState bool)

CheckShardQueryServices checks DisableQueryService for all shards

func CheckSrvKeyspace

func CheckSrvKeyspace(t *testing.T, cell string, ksname string, shardingCol string, colType topodata.KeyspaceIdType, expectedPartition map[topodata.TabletType][]string, ci cluster.LocalProcessCluster)

CheckSrvKeyspace verifies the schema with expectedPartition

func CheckTabletQueryService

func CheckTabletQueryService(t *testing.T, vttablet cluster.Vttablet, expectedStatus string, tabletControlEnabled bool, ci cluster.LocalProcessCluster)

CheckTabletQueryService check that the query service is enabled or disabled on the tablet

func CheckTabletQueryServices

func CheckTabletQueryServices(t *testing.T, vttablets []cluster.Vttablet, expectedStatus string, tabletControlEnabled bool, ci cluster.LocalProcessCluster)

CheckTabletQueryServices check that the query service is enabled or disabled on the specified tablets.

func CheckThrottlerService

func CheckThrottlerService(t *testing.T, server string, names []string, rate int, ci cluster.LocalProcessCluster)

CheckThrottlerService runs checkThrottlerServiceMaxRates and checkThrottlerServiceConfigs

func CheckValues

func CheckValues(t *testing.T, vttablet cluster.Vttablet, id uint64, msg string, exists bool, tableName string, ks string, keyType querypb.Type, dbConn *mysql.Conn) bool

CheckValues check value from sql query to table with expected values

func ExecuteOnTablet

func ExecuteOnTablet(t *testing.T, query string, vttablet cluster.Vttablet, ks string, expectFail bool)

ExecuteOnTablet executes a write query on specified vttablet It should always be called with a master tablet for the keyspace/shard

func GetShardInfo

func GetShardInfo(t *testing.T, shard1Ks string, ci cluster.LocalProcessCluster) *topodata.Shard

GetShardInfo return the Shard information

func GetSrvKeyspace

func GetSrvKeyspace(t *testing.T, cell string, ksname string, ci cluster.LocalProcessCluster) *topodata.SrvKeyspace

GetSrvKeyspace return the Srv Keyspace structure

func InsertLots

func InsertLots(t *testing.T, count uint64, vttablet cluster.Vttablet, table string, ks string)

InsertLots inserts multiple values to vttablet

func InsertMultiValues

func InsertMultiValues(t *testing.T, tablet cluster.Vttablet, keyspaceName string, tableName string,
	fixedParentID int, ids []int, msgs []string, ksIDs []uint64)

InsertMultiValues inserts a multiple values to vttablet

func VerifyTabletHealth

func VerifyTabletHealth(t *testing.T, vttablet cluster.Vttablet, hostname string)

VerifyTabletHealth checks that the tablet URL is reachable.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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