From 5834c9f3c04c8186da4f28abcde179f54469c255 Mon Sep 17 00:00:00 2001 From: Yujie Xia Date: Mon, 25 Apr 2022 16:45:55 +0800 Subject: [PATCH] address comments --- br/pkg/lightning/restore/meta_manager.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/br/pkg/lightning/restore/meta_manager.go b/br/pkg/lightning/restore/meta_manager.go index fc65ea10c37f9..a4cc5ecb2f154 100644 --- a/br/pkg/lightning/restore/meta_manager.go +++ b/br/pkg/lightning/restore/meta_manager.go @@ -1087,13 +1087,15 @@ func (m *singleTaskMetaMgr) InitTask(ctx context.Context, source int64) error { func (m *singleTaskMetaMgr) CheckTasksExclusively(ctx context.Context, action func(tasks []taskMeta) ([]taskMeta, error)) error { newTasks, err := action([]taskMeta{ { - taskID: m.taskID, - status: taskMetaStatusInitial, - sourceBytes: m.sourceBytes, + taskID: m.taskID, + status: taskMetaStatusInitial, + sourceBytes: m.sourceBytes, + clusterAvail: m.clusterAvail, }, }) for _, t := range newTasks { if m.taskID == t.taskID { + m.sourceBytes = t.sourceBytes m.clusterAvail = t.clusterAvail } }