File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ go_library(
2525 "//pkg/session" ,
2626 "//pkg/session/sessionapi" ,
2727 "//pkg/sessionctx" ,
28+ "//pkg/sessionctx/vardef" ,
2829 "@com_github_pingcap_errors//:errors" ,
2930 "@com_github_pingcap_log//:log" ,
3031 "@com_github_tikv_pd_client//:client" ,
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import (
2525 "github.com/pingcap/tidb/pkg/session"
2626 "github.com/pingcap/tidb/pkg/session/sessionapi"
2727 "github.com/pingcap/tidb/pkg/sessionctx"
28+ "github.com/pingcap/tidb/pkg/sessionctx/vardef"
2829 pd "github.com/tikv/pd/client"
2930 "go.uber.org/zap"
3031)
@@ -40,6 +41,9 @@ const brComment = `/*from(br)*/`
4041// New makes a new tidb glue.
4142func New () Glue {
4243 log .Debug ("enabling no register config" )
44+ // Set schema lease to production value (45s) instead of test default (1s)
45+ // to prevent BR from getting stuck when PD TSO slightly lags wall clock.
46+ vardef .SetSchemaLease (config .DefSchemaLease )
4347 config .UpdateGlobal (func (conf * config.Config ) {
4448 conf .SkipRegisterToDashboard = true
4549 conf .Log .EnableSlowLog .Store (false )
You can’t perform that action at this time.
0 commit comments