From f88714d1af06f3adf80a593f314eb80cb8025a31 Mon Sep 17 00:00:00 2001 From: Zak Zhao <57036248+joccau@users.noreply.github.com> Date: Wed, 11 Jan 2023 21:00:33 +0800 Subject: [PATCH] br: need init MDL variable when GetDomain (#40512) Signed-off-by: joccau Signed-off-by: joccau Co-authored-by: Ti Chi Robot --- 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.