Documentation
¶
Overview ¶
Package check provides various configuration and health checks that can be run against a sql.DB connection.
Index ¶
Constants ¶
View Source
const ( // Formats for table names NameFormatCheckpoint = "_%s_chkpnt" NameFormatNew = "_%s_new" NameFormatOld = "_%s_old" NameFormatOldTimeStamp = "_%s_old_%s" NameFormatTimestamp = "20060102_150405" )
Variables ¶
View Source
var ( // The number of extra characters needed for table names with all possible // formats. These vars are calculated in the `init` function below. NameFormatNormalExtraChars = 0 NameFormatTimestampExtraChars = 0 )
View Source
var ErrVisibilityMixedWithOtherChanges = errors.New("the ALTER operation contains a change to index visibility mixed with table-rebuilding operations. This creates semantic issues for experiments. Please split the ALTER statement into separate statements for changing the invisible index and other operations")
ErrVisibilityMixedWithOtherChanges is returned when index visibility changes are mixed with table-rebuilding operations
Functions ¶
func AlterContainsIndexVisibility ¶
func AlterContainsIndexVisibility(stmt *statement.AbstractStatement) error
AlterContainsIndexVisibility checks to see if there are any clauses of an ALTER to change index visibility. Allows index visibility changes when mixed with other metadata-only operations, but blocks them when mixed with table-rebuilding operations to avoid semantic issues.
Types ¶
type Resources ¶
type Resources struct {
DB *sql.DB
Replica *sql.DB
Table *table.TableInfo
Statement *statement.AbstractStatement
TargetChunkTime time.Duration
Threads int
ReplicaMaxLag time.Duration
SkipDropAfterCutover bool
ForceKill bool
// The following resources are only used by the
// pre-run checks
Host string
Username string
Password string
TLSMode string
TLSCertificatePath string
ExperimentalBufferedCopy bool
}
Click to show internal directories.
Click to hide internal directories.