Skip to content

Commit

Permalink
rollback toml config changes
Browse files Browse the repository at this point in the history
Signed-off-by: artem_danilov <[email protected]>
  • Loading branch information
Tema committed Jan 13, 2025
1 parent 620862d commit 8f454b4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
10 changes: 0 additions & 10 deletions cmd/tidb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ import (
"github.com/prometheus/client_golang/prometheus/push"
"github.com/tikv/client-go/v2/tikv"
"github.com/tikv/client-go/v2/txnkv/transaction"
"github.com/tikv/pd/client/pkg/circuitbreaker"
"go.uber.org/automaxprocs/maxprocs"
"go.uber.org/zap"
)
Expand Down Expand Up @@ -804,15 +803,6 @@ func setGlobalVars() {

atomic.StoreUint64(&transaction.CommitMaxBackoff, uint64(parseDuration(cfg.TiKVClient.CommitTimeout).Seconds()*1000))
tikv.SetRegionCacheTTLSec(int64(cfg.TiKVClient.RegionCacheTTL))
tikv.ChangePdRegionMetaCircuitBreakerSettings(func(config *circuitbreaker.Settings) {
s := cfg.TiKVClient.CircuitBreakerSettingsList.PDRegionsMetadata
// config.ErrorRateThreshold is controlled by tidb_cb_pd_metadata_error_rate_threshold_pct sysvar
config.ErrorRateWindow = time.Duration(s.ErrorRateEvaluationWindowSeconds) * time.Second
config.MinQPSForOpen = uint32(s.MinQPSToOpen)
config.CoolDownInterval = time.Duration(s.CooldownIntervalSeconds) * time.Second
config.HalfOpenSuccessCount = uint32(s.HalfOpenSuccessCount)
})

domainutil.RepairInfo.SetRepairMode(cfg.RepairMode)
domainutil.RepairInfo.SetRepairTableList(cfg.RepairTableList)
executor.GlobalDiskUsageTracker.SetBytesLimit(cfg.TempStorageQuota)
Expand Down
10 changes: 0 additions & 10 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,11 +743,6 @@ grpc-keepalive-timeout = 0.2
[tikv-client.async-commit]
keys-limit=123
total-key-size-limit=1024
[tikv-client.circuit-breaker.pd-region-metadata]
error-rate-evaluation-window-seconds = 50
min-qps-to-open=15
cooldown-interval-seconds=25
half-open-success-count=5
[experimental]
allow-expression-index = true
[isolation-read]
Expand Down Expand Up @@ -789,11 +784,6 @@ max_connections = 200
require.Equal(t, uint64(1024), conf.TiKVClient.AsyncCommit.TotalKeySizeLimit)
require.Equal(t, uint(128), conf.TiKVClient.MaxBatchSize)
require.Equal(t, uint(6000), conf.TiKVClient.RegionCacheTTL)
cbSettings := conf.TiKVClient.CircuitBreakerSettingsList.PDRegionsMetadata
require.Equal(t, uint(50), cbSettings.ErrorRateEvaluationWindowSeconds)
require.Equal(t, uint(15), cbSettings.MinQPSToOpen)
require.Equal(t, uint(25), cbSettings.CooldownIntervalSeconds)
require.Equal(t, uint(5), cbSettings.HalfOpenSuccessCount)
require.Equal(t, int64(0), conf.TiKVClient.StoreLimit)
require.Equal(t, int64(8192), conf.TiKVClient.TTLRefreshedTxnSize)
require.Equal(t, time.Millisecond*200, conf.TiKVClient.GetGrpcKeepAliveTimeout())
Expand Down

0 comments on commit 8f454b4

Please sign in to comment.