From a5a4879fd83a8de5cc8192630ca7d220528b6adf Mon Sep 17 00:00:00 2001 From: joccau Date: Wed, 11 Jan 2023 18:31:13 +0800 Subject: [PATCH] need init MDL variable when GetDomain() Signed-off-by: joccau --- br/pkg/gluetidb/glue.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/br/pkg/gluetidb/glue.go b/br/pkg/gluetidb/glue.go index c9756fe07ea89..45c8d84862351 100644 --- a/br/pkg/gluetidb/glue.go +++ b/br/pkg/gluetidb/glue.go @@ -136,6 +136,10 @@ func (g Glue) UseOneShotSession(store kv.Storage, closeDomain bool, fn func(glue if err != nil { return errors.Trace(err) } + if err = session.InitMDLVariable(store); err != nil { + return errors.Trace(err) + } + // because domain was created during the whole program exists. // and it will register br info to info syncer. // we'd better close it as soon as possible.