Documentation ¶
Index ¶
- Constants
- Variables
- func ExecTestIncrementalBackupAndRestoreToPos(t *testing.T, tcase *PITRTestCase)
- func ExecTestIncrementalBackupAndRestoreToTimestamp(t *testing.T, tcase *PITRTestCase)
- func ExecTestIncrementalBackupOnTwoTablets(t *testing.T, tcase *PITRTestCase)
- func FlushAndPurgeBinaryLogsOnReplica(t *testing.T, replicaIndex int) (lastBinlog string)
- func FlushBinaryLogsOnReplica(t *testing.T, replicaIndex int, count int)
- func GetReplicaGtidPurged(t *testing.T, replicaIndex int) string
- func GetReplicaPosition(t *testing.T, replicaIndex int) string
- func InitTestTable(t *testing.T)
- func InsertRowOnPrimary(t *testing.T, hint string)
- func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *CompressionDetails) (int, error)
- func ReadRowsFromPrimary(t *testing.T) (msgs []string)
- func ReadRowsFromReplica(t *testing.T, replicaIndex int) (msgs []string)
- func ReadRowsFromTablet(t *testing.T, tablet *cluster.Vttablet) (msgs []string)
- func RemoveBackup(t *testing.T, backupName string)
- func TearDownCluster()
- func TestBackup(t *testing.T, setupType int, streamMode string, stripes int, ...) error
- func TestReplicaFullBackup(t *testing.T, replicaIndex int) (manifest *mysqlctl.BackupManifest)
- func TestReplicaFullRestore(t *testing.T, replicaIndex int, expectError string)
- func TestReplicaIncrementalBackup(t *testing.T, replicaIndex int, incrementalFromPos string, expectEmpty bool, ...) (manifest *mysqlctl.BackupManifest, backupName string)
- func TestReplicaRestoreToPos(t *testing.T, replicaIndex int, restoreToPos replication.Position, ...)
- func TestReplicaRestoreToTimestamp(t *testing.T, restoreToTimestamp time.Time, expectError string)
- type CompressionDetails
- type PITRTestCase
Constants ¶
const ( XtraBackup = iota BuiltinBackup Mysqlctld )
constants for test variants
Variables ¶
var (
SetupReplica3Tablet func(extraArgs []string) (*cluster.Vttablet, error)
)
Functions ¶
func ExecTestIncrementalBackupAndRestoreToPos ¶ added in v0.18.0
func ExecTestIncrementalBackupAndRestoreToPos(t *testing.T, tcase *PITRTestCase)
ExecTestIncrementalBackupAndRestoreToPos runs a series of backups: a full backup and multiple incremental backups. in between, it makes writes to the database, and takes notes: what data was available in what backup. It then restores each and every one of those backups, in random order, and expects to find the specific data associated with the backup.
func ExecTestIncrementalBackupAndRestoreToTimestamp ¶ added in v0.18.0
func ExecTestIncrementalBackupAndRestoreToTimestamp(t *testing.T, tcase *PITRTestCase)
ExecTestIncrementalBackupAndRestoreToPos
func ExecTestIncrementalBackupOnTwoTablets ¶ added in v0.18.0
func ExecTestIncrementalBackupOnTwoTablets(t *testing.T, tcase *PITRTestCase)
ExecTestIncrementalBackupOnTwoTablets runs a series of interleaved backups on two different replicas: full and incremental. Specifically, it's designed to test how incremental backups are taken by interleaved replicas, so that they successfully build on one another.
func FlushAndPurgeBinaryLogsOnReplica ¶ added in v0.18.0
FlushAndPurgeBinaryLogsOnReplica intentionally loses all existing binary logs. It flushes into a new binary log and immediately purges all previous logs. This is used to lose information.
func FlushBinaryLogsOnReplica ¶ added in v0.18.0
FlushBinaryLogsOnReplica issues `FLUSH BINARY LOGS` <count> times
func GetReplicaGtidPurged ¶ added in v0.16.0
func GetReplicaPosition ¶ added in v0.16.0
func InitTestTable ¶ added in v0.16.0
func InsertRowOnPrimary ¶ added in v0.16.0
func LaunchCluster ¶
func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *CompressionDetails) (int, error)
LaunchCluster : starts the cluster as per given params.
func ReadRowsFromPrimary ¶ added in v0.16.0
func ReadRowsFromReplica ¶ added in v0.16.0
func ReadRowsFromTablet ¶ added in v0.16.0
func RemoveBackup ¶ added in v0.16.0
func TestBackup ¶
func TestBackup(t *testing.T, setupType int, streamMode string, stripes int, cDetails *CompressionDetails, runSpecific []string) error
TestBackup runs all the backup tests
func TestReplicaFullBackup ¶ added in v0.16.0
func TestReplicaFullBackup(t *testing.T, replicaIndex int) (manifest *mysqlctl.BackupManifest)
func TestReplicaFullRestore ¶ added in v0.18.0
func TestReplicaIncrementalBackup ¶ added in v0.16.0
func TestReplicaRestoreToPos ¶ added in v0.16.0
Types ¶
type CompressionDetails ¶ added in v0.15.0
type PITRTestCase ¶ added in v0.18.0
type PITRTestCase struct { Name string SetupType int ComprssDetails *CompressionDetails }