Skip to content

Commit

Permalink
tidb-server: set TiDBMemQuotaQuery to the value in configuration file (
Browse files Browse the repository at this point in the history
  • Loading branch information
XuHuaiyu authored and coocood committed Sep 20, 2018
1 parent 23baa75 commit c7c2f3c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tidb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ func setGlobalVars() {
plan.AllowCartesianProduct = cfg.Performance.CrossJoin
privileges.SkipWithGrant = cfg.Security.SkipGrantTable

variable.SysVars[variable.TIDBMemQuotaQuery].Value = strconv.FormatInt(cfg.MemQuotaQuery, 10)
variable.SysVars["lower_case_table_names"].Value = strconv.Itoa(cfg.LowerCaseTableNames)

if cfg.PlanCache.Enabled {
plan.GlobalPlanCache = kvcache.NewShardedLRUCache(cfg.PlanCache.Capacity, cfg.PlanCache.Shards)
}
Expand All @@ -392,9 +395,6 @@ func setGlobalVars() {
tikv.GrpcKeepAliveTime = time.Duration(cfg.TiKVClient.GrpcKeepAliveTime) * time.Second
tikv.GrpcKeepAliveTimeout = time.Duration(cfg.TiKVClient.GrpcKeepAliveTimeout) * time.Second

// set lower_case_table_names
variable.SysVars["lower_case_table_names"].Value = strconv.Itoa(cfg.LowerCaseTableNames)

tikv.CommitMaxBackoff = int(parseDuration(cfg.TiKVClient.CommitTimeout).Seconds() * 1000)
}

Expand Down

0 comments on commit c7c2f3c

Please sign in to comment.