tidb: github.com/pingcap/tidb/config Index | Files

package config

import "github.com/pingcap/tidb/config"

Index

Package Files

config.go config_util.go

Constants

const (
    MaxLogFileSize = 4096 // MB
    // DefTxnEntrySizeLimit is the default value of TxnEntrySizeLimit.
    DefTxnEntrySizeLimit = 6 * 1024 * 1024
    // DefTxnTotalSizeLimit is the default value of TxnTxnTotalSizeLimit.
    DefTxnTotalSizeLimit = 100 * 1024 * 1024
    // DefMaxIndexLength is the maximum index length(in bytes). This value is consistent with MySQL.
    DefMaxIndexLength = 3072
    // DefMaxOfMaxIndexLength is the maximum index length(in bytes) for TiDB v3.0.7 and previous version.
    DefMaxOfMaxIndexLength = 3072 * 4
    // DefPort is the default port of TiDB
    DefPort = 4000
    // DefStatusPort is the default status port of TiDB
    DefStatusPort = 10080
    // DefHost is the default host of TiDB
    DefHost = "0.0.0.0"
    // DefStatusHost is the default status host of TiDB
    DefStatusHost = "0.0.0.0"
    // DefStoreLivenessTimeout is the default value for store liveness timeout.
    DefStoreLivenessTimeout = "5s"
    // DefTiDBRedactLog is the default value for redact log.
    DefTiDBRedactLog = 0
)

Config number limitations

const (
    SpilledFileEncryptionMethodPlaintext = "plaintext"
    SpilledFileEncryptionMethodAES128CTR = "aes128-ctr"
)

The following constants represents the valid action configurations for Security.SpilledFileEncryptionMethod. "plaintext" means encryption is disabled. NOTE: Although the values is case insensitive, we should use lower-case strings because the configuration value will be transformed to lower-case string and compared with these constants in the further usage.

const (
    OOMActionCancel = "cancel"
    OOMActionLog    = "log"
)

The following constants represents the valid action configurations for OOMAction. NOTE: Although the values is case insensitive, we should use lower-case strings because the configuration value will be transformed to lower-case string and compared with these constants in the further usage.

Variables

var (
    ValidStorage = map[string]bool{
        "mocktikv": true,
        "tikv":     true,
        "unistore": true,
    }
    // checkTableBeforeDrop enable to execute `admin check table` before `drop table`.
    CheckTableBeforeDrop = false
)

Valid config maps

var TableLockDelayClean = func() uint64 {
    return GetGlobalConfig().DelayCleanTableLock
}

TableLockDelayClean uses to get the time of delay clean table lock.

func FlattenConfigItems Uses

func FlattenConfigItems(nestedConfig map[string]interface{}) map[string]interface{}

FlattenConfigItems flatten this config, see more cases in the test.

func InitializeConfig Uses

func InitializeConfig(confPath string, configCheck, configStrict bool, reloadFunc ConfReloadFunc, enforceCmdArgs func(*Config))

InitializeConfig initialize the global config handler. The function enforceCmdArgs is used to merge the config file with command arguments: For example, if you start TiDB by the command "./tidb-server --port=3000", the port number should be overwritten to 3000 and ignore the port number in the config file.

func MergeConfigItems Uses

func MergeConfigItems(dstConf, newConf *Config) (acceptedItems, rejectedItems []string)

MergeConfigItems overwrites the dynamic config items and leaves the other items unchanged.

func ParsePath Uses

func ParsePath(path string) (etcdAddrs []string, disableGC bool, err error)

ParsePath parses this path.

func RedactLogEnabled Uses

func RedactLogEnabled() bool

RedactLogEnabled uses to check whether enabled the log redact.

func RestoreFunc Uses

func RestoreFunc() (restore func())

RestoreFunc gets a function that restore the config to the current value.

func SetRedactLog Uses

func SetRedactLog(enable bool)

SetRedactLog uses to set log redact status.

func StoreGlobalConfig Uses

func StoreGlobalConfig(config *Config)

StoreGlobalConfig stores a new config to the globalConf. It mostly uses in the test to avoid some data races.

func TableLockEnabled Uses

func TableLockEnabled() bool

TableLockEnabled uses to check whether enabled the table lock feature.

func UpdateGlobal Uses

func UpdateGlobal(f func(conf *Config))

UpdateGlobal updates the global config, and provide a restore function that can be used to restore to the original.

type Binlog Uses

type Binlog struct {
    Enable bool `toml:"enable" json:"enable"`
    // If IgnoreError is true, when writing binlog meets error, TiDB would
    // ignore the error.
    IgnoreError  bool   `toml:"ignore-error" json:"ignore-error"`
    WriteTimeout string `toml:"write-timeout" json:"write-timeout"`
    // Use socket file to write binlog, for compatible with kafka version tidb-binlog.
    BinlogSocket string `toml:"binlog-socket" json:"binlog-socket"`
    // The strategy for sending binlog to pump, value can be "range" or "hash" now.
    Strategy string `toml:"strategy" json:"strategy"`
}

Binlog is the config for binlog.

type ConfReloadFunc Uses

type ConfReloadFunc func(oldConf, newConf *Config)

ConfReloadFunc is used to reload the config to make it work.

type Config Uses

type Config struct {
    Host                        string `toml:"host" json:"host"`
    AdvertiseAddress            string `toml:"advertise-address" json:"advertise-address"`
    Port                        uint   `toml:"port" json:"port"`
    Cors                        string `toml:"cors" json:"cors"`
    Store                       string `toml:"store" json:"store"`
    Path                        string `toml:"path" json:"path"`
    Socket                      string `toml:"socket" json:"socket"`
    Lease                       string `toml:"lease" json:"lease"`
    RunDDL                      bool   `toml:"run-ddl" json:"run-ddl"`
    SplitTable                  bool   `toml:"split-table" json:"split-table"`
    TokenLimit                  uint   `toml:"token-limit" json:"token-limit"`
    OOMUseTmpStorage            bool   `toml:"oom-use-tmp-storage" json:"oom-use-tmp-storage"`
    TempStoragePath             string `toml:"tmp-storage-path" json:"tmp-storage-path"`
    OOMAction                   string `toml:"oom-action" json:"oom-action"`
    MemQuotaQuery               int64  `toml:"mem-quota-query" json:"mem-quota-query"`
    NestedLoopJoinCacheCapacity int64  `toml:"nested-loop-join-cache-capacity" json:"nested-loop-join-cache-capacity"`
    // TempStorageQuota describe the temporary storage Quota during query exector when OOMUseTmpStorage is enabled
    // If the quota exceed the capacity of the TempStoragePath, the tidb-server would exit with fatal error
    TempStorageQuota int64           `toml:"tmp-storage-quota" json:"tmp-storage-quota"` // Bytes
    EnableStreaming  bool            `toml:"enable-streaming" json:"enable-streaming"`
    EnableBatchDML   bool            `toml:"enable-batch-dml" json:"enable-batch-dml"`
    TxnLocalLatches  TxnLocalLatches `toml:"-" json:"-"`
    // Set sys variable lower-case-table-names, ref: https://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html.
    // TODO: We actually only support mode 2, which keeps the original case, but the comparison is case-insensitive.
    LowerCaseTableNames int               `toml:"lower-case-table-names" json:"lower-case-table-names"`
    ServerVersion       string            `toml:"server-version" json:"server-version"`
    Log                 Log               `toml:"log" json:"log"`
    Security            Security          `toml:"security" json:"security"`
    Status              Status            `toml:"status" json:"status"`
    Performance         Performance       `toml:"performance" json:"performance"`
    PreparedPlanCache   PreparedPlanCache `toml:"prepared-plan-cache" json:"prepared-plan-cache"`
    OpenTracing         OpenTracing       `toml:"opentracing" json:"opentracing"`
    ProxyProtocol       ProxyProtocol     `toml:"proxy-protocol" json:"proxy-protocol"`
    TiKVClient          TiKVClient        `toml:"tikv-client" json:"tikv-client"`
    Binlog              Binlog            `toml:"binlog" json:"binlog"`
    CompatibleKillQuery bool              `toml:"compatible-kill-query" json:"compatible-kill-query"`
    Plugin              Plugin            `toml:"plugin" json:"plugin"`
    PessimisticTxn      PessimisticTxn    `toml:"pessimistic-txn" json:"pessimistic-txn"`
    CheckMb4ValueInUTF8 bool              `toml:"check-mb4-value-in-utf8" json:"check-mb4-value-in-utf8"`
    MaxIndexLength      int               `toml:"max-index-length" json:"max-index-length"`
    // AlterPrimaryKey is used to control alter primary key feature.
    AlterPrimaryKey bool `toml:"alter-primary-key" json:"alter-primary-key"`
    // TreatOldVersionUTF8AsUTF8MB4 is use to treat old version table/column UTF8 charset as UTF8MB4. This is for compatibility.
    // Currently not support dynamic modify, because this need to reload all old version schema.
    TreatOldVersionUTF8AsUTF8MB4 bool `toml:"treat-old-version-utf8-as-utf8mb4" json:"treat-old-version-utf8-as-utf8mb4"`
    // EnableTableLock indicate whether enable table lock.
    // TODO: remove this after table lock features stable.
    EnableTableLock     bool        `toml:"enable-table-lock" json:"enable-table-lock"`
    DelayCleanTableLock uint64      `toml:"delay-clean-table-lock" json:"delay-clean-table-lock"`
    SplitRegionMaxNum   uint64      `toml:"split-region-max-num" json:"split-region-max-num"`
    StmtSummary         StmtSummary `toml:"stmt-summary" json:"stmt-summary"`
    // RepairMode indicates that the TiDB is in the repair mode for table meta.
    RepairMode      bool     `toml:"repair-mode" json:"repair-mode"`
    RepairTableList []string `toml:"repair-table-list" json:"repair-table-list"`
    // IsolationRead indicates that the TiDB reads data from which isolation level(engine and label).
    IsolationRead IsolationRead `toml:"isolation-read" json:"isolation-read"`
    // MaxServerConnections is the maximum permitted number of simultaneous client connections.
    MaxServerConnections uint32 `toml:"max-server-connections" json:"max-server-connections"`
    // NewCollationsEnabledOnFirstBootstrap indicates if the new collations are enabled, it effects only when a TiDB cluster bootstrapped on the first time.
    NewCollationsEnabledOnFirstBootstrap bool `toml:"new_collations_enabled_on_first_bootstrap" json:"new_collations_enabled_on_first_bootstrap"`
    // Experimental contains parameters for experimental features.
    Experimental Experimental `toml:"experimental" json:"experimental"`
    // EnableCollectExecutionInfo enables the TiDB to collect execution info.
    EnableCollectExecutionInfo bool `toml:"enable-collect-execution-info" json:"enable-collect-execution-info"`
    // SkipRegisterToDashboard tells TiDB don't register itself to the dashboard.
    SkipRegisterToDashboard bool `toml:"skip-register-to-dashboard" json:"skip-register-to-dashboard"`
    // EnableTelemetry enables the usage data report to PingCAP.
    EnableTelemetry bool `toml:"enable-telemetry" json:"enable-telemetry"`
    // Labels indicates the labels set for the tidb server. The labels describe some specific properties for the tidb
    // server like `zone`/`rack`/`host`. Currently, labels won't affect the tidb server except for some special
    // label keys. Now we only have `group` as a special label key.
    // Note that: 'group' is a special label key which should be automatically set by tidb-operator. We don't suggest
    // users to set 'group' in labels.
    Labels map[string]string `toml:"labels" json:"labels"`
    // EnableGlobalIndex enables creating global index.
    EnableGlobalIndex bool `toml:"enable-global-index" json:"enable-global-index"`
    // DeprecateIntegerDisplayWidth indicates whether deprecating the max display length for integer.
    DeprecateIntegerDisplayWidth bool `toml:"deprecate-integer-display-length" json:"deprecate-integer-display-length"`
    // EnableRedactLog indicates that whether redact log, 0 is disable. 1 is enable.
    EnableRedactLog int32 `toml:"enable-redact-log" json:"enable-redact-log"`
}

Config contains configuration options.

func CloneConf Uses

func CloneConf(conf *Config) (*Config, error)

CloneConf deeply clones this config.

func GetGlobalConfig Uses

func GetGlobalConfig() *Config

GetGlobalConfig returns the global configuration for this server. It should store configuration from command line and configuration file. Other parts of the system can read the global configuration use this function.

func NewConfig Uses

func NewConfig() *Config

NewConfig creates a new config instance with default value.

func (*Config) Load Uses

func (c *Config) Load(confFile string) error

Load loads config options from a toml file.

func (*Config) UpdateTempStoragePath Uses

func (c *Config) UpdateTempStoragePath()

UpdateTempStoragePath is to update the `TempStoragePath` if port/statusPort was changed and the `tmp-storage-path` was not specified in the conf.toml or was specified the same as the default value.

func (*Config) Valid Uses

func (c *Config) Valid() error

Valid checks if this config is valid.

type CoprocessorCache Uses

type CoprocessorCache struct {
    // Whether to enable the copr cache. The copr cache saves the result from TiKV Coprocessor in the memory and
    // reuses the result when corresponding data in TiKV is unchanged, on a region basis.
    Enable bool `toml:"enable" json:"enable"`
    // The capacity in MB of the cache.
    CapacityMB float64 `toml:"capacity-mb" json:"capacity-mb"`
    // Only cache requests whose result set is small.
    AdmissionMaxResultMB float64 `toml:"admission-max-result-mb" json:"admission-max-result-mb"`
    // Only cache requests takes notable time to process.
    AdmissionMinProcessMs uint64 `toml:"admission-min-process-ms" json:"admission-min-process-ms"`
}

CoprocessorCache is the config for coprocessor cache.

type ErrConfigValidationFailed Uses

type ErrConfigValidationFailed struct {
    UndecodedItems []string
    // contains filtered or unexported fields
}

The ErrConfigValidationFailed error is used so that external callers can do a type assertion to defer handling of this specific error when someone does not want strict type checking. This is needed only because logging hasn't been set up at the time we parse the config file. This should all be ripped out once strict config checking is made the default behavior.

func (*ErrConfigValidationFailed) Error Uses

func (e *ErrConfigValidationFailed) Error() string

type Experimental Uses

type Experimental struct {
}

Experimental controls the features that are still experimental: their semantics, interfaces are subject to change. Using these features in the production environment is not recommended.

type IsolationRead Uses

type IsolationRead struct {
    // Engines filters tidb-server access paths by engine type.
    Engines []string `toml:"engines" json:"engines"`
}

IsolationRead is the config for isolation read.

type Log Uses

type Log struct {
    // Log level.
    Level string `toml:"level" json:"level"`
    // Log format. one of json, text, or console.
    Format string `toml:"format" json:"format"`
    // Disable automatic timestamps in output. Deprecated: use EnableTimestamp instead.
    DisableTimestamp nullableBool `toml:"disable-timestamp" json:"disable-timestamp"`
    // EnableTimestamp enables automatic timestamps in log output.
    EnableTimestamp nullableBool `toml:"enable-timestamp" json:"enable-timestamp"`
    // DisableErrorStack stops annotating logs with the full stack error
    // message. Deprecated: use EnableErrorStack instead.
    DisableErrorStack nullableBool `toml:"disable-error-stack" json:"disable-error-stack"`
    // EnableErrorStack enables annotating logs with the full stack error
    // message.
    EnableErrorStack nullableBool `toml:"enable-error-stack" json:"enable-error-stack"`
    // File log config.
    File logutil.FileLogConfig `toml:"file" json:"file"`

    EnableSlowLog       bool   `toml:"enable-slow-log" json:"enable-slow-log"`
    SlowQueryFile       string `toml:"slow-query-file" json:"slow-query-file"`
    SlowThreshold       uint64 `toml:"slow-threshold" json:"slow-threshold"`
    ExpensiveThreshold  uint   `toml:"expensive-threshold" json:"expensive-threshold"`
    QueryLogMaxLen      uint64 `toml:"query-log-max-len" json:"query-log-max-len"`
    RecordPlanInSlowLog uint32 `toml:"record-plan-in-slow-log" json:"record-plan-in-slow-log"`
}

Log is the log section of config.

func (*Log) ToLogConfig Uses

func (l *Log) ToLogConfig() *logutil.LogConfig

ToLogConfig converts *Log to *logutil.LogConfig.

type OpenTracing Uses

type OpenTracing struct {
    Enable     bool                `toml:"enable" json:"enable"`
    RPCMetrics bool                `toml:"rpc-metrics" json:"rpc-metrics"`
    Sampler    OpenTracingSampler  `toml:"sampler" json:"sampler"`
    Reporter   OpenTracingReporter `toml:"reporter" json:"reporter"`
}

OpenTracing is the opentracing section of the config.

func (*OpenTracing) ToTracingConfig Uses

func (t *OpenTracing) ToTracingConfig() *tracing.Configuration

ToTracingConfig converts *OpenTracing to *tracing.Configuration.

type OpenTracingReporter Uses

type OpenTracingReporter struct {
    QueueSize           int           `toml:"queue-size" json:"queue-size"`
    BufferFlushInterval time.Duration `toml:"buffer-flush-interval" json:"buffer-flush-interval"`
    LogSpans            bool          `toml:"log-spans" json:"log-spans"`
    LocalAgentHostPort  string        `toml:"local-agent-host-port" json:"local-agent-host-port"`
}

OpenTracingReporter is the config for opentracing reporter. See https://godoc.org/github.com/uber/jaeger-client-go/config#ReporterConfig

type OpenTracingSampler Uses

type OpenTracingSampler struct {
    Type                    string        `toml:"type" json:"type"`
    Param                   float64       `toml:"param" json:"param"`
    SamplingServerURL       string        `toml:"sampling-server-url" json:"sampling-server-url"`
    MaxOperations           int           `toml:"max-operations" json:"max-operations"`
    SamplingRefreshInterval time.Duration `toml:"sampling-refresh-interval" json:"sampling-refresh-interval"`
}

OpenTracingSampler is the config for opentracing sampler. See https://godoc.org/github.com/uber/jaeger-client-go/config#SamplerConfig

type Performance Uses

type Performance struct {
    MaxProcs uint `toml:"max-procs" json:"max-procs"`
    // Deprecated: use ServerMemoryQuota instead
    MaxMemory            uint64  `toml:"max-memory" json:"max-memory"`
    ServerMemoryQuota    uint64  `toml:"server-memory-quota" json:"server-memory-quota"`
    StatsLease           string  `toml:"stats-lease" json:"stats-lease"`
    StmtCountLimit       uint    `toml:"stmt-count-limit" json:"stmt-count-limit"`
    FeedbackProbability  float64 `toml:"feedback-probability" json:"feedback-probability"`
    QueryFeedbackLimit   uint    `toml:"query-feedback-limit" json:"query-feedback-limit"`
    PseudoEstimateRatio  float64 `toml:"pseudo-estimate-ratio" json:"pseudo-estimate-ratio"`
    ForcePriority        string  `toml:"force-priority" json:"force-priority"`
    BindInfoLease        string  `toml:"bind-info-lease" json:"bind-info-lease"`
    TxnEntrySizeLimit    uint64  `toml:"txn-entry-size-limit" json:"txn-entry-size-limit"`
    TxnTotalSizeLimit    uint64  `toml:"txn-total-size-limit" json:"txn-total-size-limit"`
    TCPKeepAlive         bool    `toml:"tcp-keep-alive" json:"tcp-keep-alive"`
    CrossJoin            bool    `toml:"cross-join" json:"cross-join"`
    RunAutoAnalyze       bool    `toml:"run-auto-analyze" json:"run-auto-analyze"`
    DistinctAggPushDown  bool    `toml:"distinct-agg-push-down" json:"agg-push-down-join"`
    CommitterConcurrency int     `toml:"committer-concurrency" json:"committer-concurrency"`
    MaxTxnTTL            uint64  `toml:"max-txn-ttl" json:"max-txn-ttl"`
    MemProfileInterval   string  `toml:"mem-profile-interval" json:"mem-profile-interval"`
    IndexUsageSyncLease  string  `toml:"index-usage-sync-lease" json:"index-usage-sync-lease"`
}

Performance is the performance section of the config.

type PessimisticTxn Uses

type PessimisticTxn struct {
    // The max count of retry for a single statement in a pessimistic transaction.
    MaxRetryCount uint `toml:"max-retry-count" json:"max-retry-count"`
}

PessimisticTxn is the config for pessimistic transaction.

type PlanCache Uses

type PlanCache struct {
    Enabled  bool `toml:"enabled" json:"enabled"`
    Capacity uint `toml:"capacity" json:"capacity"`
    Shards   uint `toml:"shards" json:"shards"`
}

PlanCache is the PlanCache section of the config.

type Plugin Uses

type Plugin struct {
    Dir  string `toml:"dir" json:"dir"`
    Load string `toml:"load" json:"load"`
}

Plugin is the config for plugin

type PreparedPlanCache Uses

type PreparedPlanCache struct {
    Enabled          bool    `toml:"enabled" json:"enabled"`
    Capacity         uint    `toml:"capacity" json:"capacity"`
    MemoryGuardRatio float64 `toml:"memory-guard-ratio" json:"memory-guard-ratio"`
}

PreparedPlanCache is the PreparedPlanCache section of the config.

type ProxyProtocol Uses

type ProxyProtocol struct {
    // PROXY protocol acceptable client networks.
    // Empty string means disable PROXY protocol,
    // * means all networks.
    Networks string `toml:"networks" json:"networks"`
    // PROXY protocol header read timeout, Unit is second.
    HeaderTimeout uint `toml:"header-timeout" json:"header-timeout"`
}

ProxyProtocol is the PROXY protocol section of the config.

type Security Uses

type Security struct {
    SkipGrantTable         bool     `toml:"skip-grant-table" json:"skip-grant-table"`
    SSLCA                  string   `toml:"ssl-ca" json:"ssl-ca"`
    SSLCert                string   `toml:"ssl-cert" json:"ssl-cert"`
    SSLKey                 string   `toml:"ssl-key" json:"ssl-key"`
    RequireSecureTransport bool     `toml:"require-secure-transport" json:"require-secure-transport"`
    ClusterSSLCA           string   `toml:"cluster-ssl-ca" json:"cluster-ssl-ca"`
    ClusterSSLCert         string   `toml:"cluster-ssl-cert" json:"cluster-ssl-cert"`
    ClusterSSLKey          string   `toml:"cluster-ssl-key" json:"cluster-ssl-key"`
    ClusterVerifyCN        []string `toml:"cluster-verify-cn" json:"cluster-verify-cn"`
    // If set to "plaintext", the spilled files will not be encrypted.
    SpilledFileEncryptionMethod string `toml:"spilled-file-encryption-method" json:"spilled-file-encryption-method"`
}

Security is the security section of the config.

func (*Security) ToTLSConfig Uses

func (s *Security) ToTLSConfig() (tlsConfig *tls.Config, err error)

ToTLSConfig generates tls's config based on security section of the config.

type Status Uses

type Status struct {
    StatusHost      string `toml:"status-host" json:"status-host"`
    MetricsAddr     string `toml:"metrics-addr" json:"metrics-addr"`
    StatusPort      uint   `toml:"status-port" json:"status-port"`
    MetricsInterval uint   `toml:"metrics-interval" json:"metrics-interval"`
    ReportStatus    bool   `toml:"report-status" json:"report-status"`
    RecordQPSbyDB   bool   `toml:"record-db-qps" json:"record-db-qps"`
}

Status is the status section of the config.

type StmtSummary Uses

type StmtSummary struct {
    // Enable statement summary or not.
    Enable bool `toml:"enable" json:"enable"`
    // Enable summary internal query.
    EnableInternalQuery bool `toml:"enable-internal-query" json:"enable-internal-query"`
    // The maximum number of statements kept in memory.
    MaxStmtCount uint `toml:"max-stmt-count" json:"max-stmt-count"`
    // The maximum length of displayed normalized SQL and sample SQL.
    MaxSQLLength uint `toml:"max-sql-length" json:"max-sql-length"`
    // The refresh interval of statement summary.
    RefreshInterval int `toml:"refresh-interval" json:"refresh-interval"`
    // The maximum history size of statement summary.
    HistorySize int `toml:"history-size" json:"history-size"`
}

StmtSummary is the config for statement summary.

type TiKVClient Uses

type TiKVClient struct {
    // GrpcConnectionCount is the max gRPC connections that will be established
    // with each tikv-server.
    GrpcConnectionCount uint `toml:"grpc-connection-count" json:"grpc-connection-count"`
    // After a duration of this time in seconds if the client doesn't see any activity it pings
    // the server to see if the transport is still alive.
    GrpcKeepAliveTime uint `toml:"grpc-keepalive-time" json:"grpc-keepalive-time"`
    // After having pinged for keepalive check, the client waits for a duration of Timeout in seconds
    // and if no activity is seen even after that the connection is closed.
    GrpcKeepAliveTimeout uint `toml:"grpc-keepalive-timeout" json:"grpc-keepalive-timeout"`
    // CommitTimeout is the max time which command 'commit' will wait.
    CommitTimeout string `toml:"commit-timeout" json:"commit-timeout"`
    // EnableAsyncCommit enables async commit for all transactions.
    EnableAsyncCommit    bool `toml:"enable-async-commit" json:"enable-async-commit"`
    AsyncCommitKeysLimit uint `toml:"async-commit-keys-limit" json:"async-commit-keys-limit"`

    // MaxBatchSize is the max batch size when calling batch commands API.
    MaxBatchSize uint `toml:"max-batch-size" json:"max-batch-size"`
    // If TiKV load is greater than this, TiDB will wait for a while to avoid little batch.
    OverloadThreshold uint `toml:"overload-threshold" json:"overload-threshold"`
    // MaxBatchWaitTime in nanosecond is the max wait time for batch.
    MaxBatchWaitTime time.Duration `toml:"max-batch-wait-time" json:"max-batch-wait-time"`
    // BatchWaitSize is the max wait size for batch.
    BatchWaitSize uint `toml:"batch-wait-size" json:"batch-wait-size"`
    // EnableChunkRPC indicate the data encode in chunk format for coprocessor requests.
    EnableChunkRPC bool `toml:"enable-chunk-rpc" json:"enable-chunk-rpc"`
    // If a Region has not been accessed for more than the given duration (in seconds), it
    // will be reloaded from the PD.
    RegionCacheTTL uint `toml:"region-cache-ttl" json:"region-cache-ttl"`
    // If a store has been up to the limit, it will return error for successive request to
    // prevent the store occupying too much token in dispatching level.
    StoreLimit int64 `toml:"store-limit" json:"store-limit"`
    // StoreLivenessTimeout is the timeout for store liveness check request.
    StoreLivenessTimeout string           `toml:"store-liveness-timeout" json:"store-liveness-timeout"`
    CoprCache            CoprocessorCache `toml:"copr-cache" json:"copr-cache"`
    // TTLRefreshedTxnSize controls whether a transaction should update its TTL or not.
    TTLRefreshedTxnSize int64 `toml:"ttl-refreshed-txn-size" json:"ttl-refreshed-txn-size"`
}

TiKVClient is the config for tikv client.

type TxnLocalLatches Uses

type TxnLocalLatches struct {
    Enabled  bool `toml:"-" json:"-"`
    Capacity uint `toml:"-" json:"-"`
}

TxnLocalLatches is the TxnLocalLatches section of the config.

Package config imports 24 packages (graph) and is imported by 226 packages. Updated 2020-09-20. Refresh now. Tools for package owners.