package
0.0.0-20231108094301-503c6884a217
Repository: https://github.com/twotigers93/tidb.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
AdaptTiKVBackoffer creates an "ad-hoc" backoffer, which wraps a backoffer and provides some new functions: When backing off, we can manually provide it a specified sleep duration instead of directly provide a retry.Config Which is sealed in the "client-go/internal".
ArchiveSize returns the total size of the backup archive.
CheckGCSafePoint checks whether the ts is older than GC safepoint.
CheckLogBackupEnabled checks if LogBackup is enabled in cluster.
CheckLogBackupTaskExist checks that whether log-backup is existed.
CheckStoreLiveness checks whether a store is still alive.
CloneSlice sallowly clones a slice.
CompareBytesExt compare two byte sequences.
CompareEndKey compared two keys that BOTH represent the EXCLUSIVE ending of some range.
EncloseDBAndTable formats the database and table name in sql.
EncloseName formats name in sql.
No description provided by the author
GetCDCChangefeedNameSet gets CDC changefeed information and wraps them to a map for CDC >= v6.2, the etcd key format is /tidb/cdc/<clusterID>/<namespace>/changefeed/info/<changefeedID> for CDC <= v6.1, the etcd key format is /tidb/cdc/changefeed/info/<changefeedID>.
No description provided by the author
GetImportTasksFrom try to get all the import tasks with prefix `RegisterTaskPrefix`.
No description provided by the author
No description provided by the author
No description provided by the author
GetSysDBCIStrName get the CIStr name of system DB.
GetSysDBName get the original name of system DB.
GetTidbNewCollationEnabled returns the variable name of NewCollationEnabled.
No description provided by the author
HideSensitive replace password with ******.
InitialRetryState make the initial state for retrying.
IntersectAll returns the intersect of two set of segments.
IsLogBackupEnabled is used for br to check whether tikv has enabled log backup.
IsLogBackupInUse checks the log backup task existed.
IsSysDB tests whether the database is system DB.
IsTemplateSysDB checks wheterh the dbname is temporary system database(__TiDB_BR_Temporary_mysql).
IsTypeCompatible checks whether type target is compatible with type src they're compatible if - same null/not null and unsigned flag(maybe we can allow src not null flag, target null flag later) - have same evaluation type - target's flen and decimal should be bigger or equals to src's - elements in target is superset of elements in src if they're enum or set type - same charset and collate if they're string types.
LoadBackupTables loads schemas from BackupMeta.
LogBackupTaskCountDec decreases the count of log backup task.
LogBackupTaskCountInc increases the count of log backup task.
LogEnvVariables logs related environment variables.
MakeSafePointID makes a unique safe point ID, for reduce name conflict.
MarshalBackupMeta converts the backupmeta strcture to JSON.
MessageIsNotFoundStorageError checks whether the message returning from TiKV is "NotFound" storage I/O error.
MessageIsPermissionDeniedStorageError checks whether the message returning from TiKV is "PermissionDenied" storage I/O error.
MessageIsRetryableStorageError checks whether the message returning from TiKV is retryable ExternalStorageError.
NeedAutoID checks whether the table needs backing up with an autoid.
NewBackoffer creates a new controller regulating a truncated exponential backoff.
NewConnPool creates a new Pool by the specified conn factory function and capacity.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewProgressPrinter returns a new progress printer.
NewStoreManager create a new manager for gRPC connections to stores.
NewTaskRegister build a TaskRegister with key format {RegisterTaskPrefix}/{RegisterTaskType}/{taskName}.
NewTaskRegisterWithTTL build a TaskRegister with key format {RegisterTaskPrefix}/{RegisterTaskType}/{taskName}.
NewWorkerPool returns a WorkPool.
NextPowerOfTwo returns the smallest power of two greater than or equal to `i` Caller should guarantee that i > 0 and the return value is not overflow.
PanicToErr recovers when the execution get panicked, and set the error provided by the arg.
ParseKey parse key by given format.
No description provided by the author
StartDynamicPProfListener starts the listener that will enable pprof when received `startPProfSignal`.
StartPProfListener forks a new goroutine listening on specified port and provide pprof info.
StartProgress starts progress bar.
StartServiceSafePointKeeper will run UpdateServiceSafePoint periodicity hence keeping service safepoint won't lose.
TemporaryDBName makes a 'private' database name.
UnmarshalBackupMeta converts the prettied JSON format of backupmeta (made by MarshalBackupMeta) back to the go structure.
UpdateServiceSafePoint register BackupTS to PD, to lock down BackupTS as safePoint with TTL seconds.
WithRetry retries a given operation with a backoff policy.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DefaultBRGCSafePointTTL means PD keep safePoint limit at least 5min.
DefaultCheckpointGCSafePointTTL means PD keep safePoint limit at least 72 minutes.
No description provided by the author
DefaultStreamPauseSafePointTTL specifies Keeping the server safePoint at list 24h when pause task.
DefaultStreamStartSafePointTTL specifies keeping the server safepoint 30 mins when start task.
No description provided by the author
region heartbeat are 10 seconds by default, if some region has 2 heartbeat missing (15 seconds), it appear to be a network issue between PD and TiKV.
No description provided by the author
The key format should be {RegisterImportTaskPrefix}/{RegisterTaskType}/{taskName}.
No description provided by the author
No description provided by the author
The key format should be {RegisterImportTaskPrefix}/{RegisterTaskType}/{taskName}.
# Structs
BRServiceSafePoint is metadata of service safe point from a BR 'instance'.
CDCNameSet saves CDC changefeed's information.
Database wraps the schema and tables of a database.
No description provided by the author
Pool is a lazy pool of gRPC channels.
ProgressPrinter prints a progress bar.
RegisterTask saves the task's information.
No description provided by the author
RetryState is the mutable state needed for retrying.
RetryWithBackoffer is a simple context for a "mixed" retry.
No description provided by the author
TaskRegister can register the task to PD with a lease, and keepalive it in the background.
Worker identified by ID.
WorkerPool contains a pool of workers.
# Interfaces
Backoffer implements a backoff policy for retrying operations.
DBExecutor is a interface for statements and txn.
QueryExecutor is a interface for exec query.
StmtExecutor define both query and exec methods.
# Type aliases
RegisterTaskType for the sub-prefix path for key.
RetryableFunc presents a retryable operation.