From 2aa8707fd0a4f7b22911772c63126c47032b5ce6 Mon Sep 17 00:00:00 2001 From: Amit Kulkarni Date: Thu, 11 Mar 2021 09:57:07 +0530 Subject: [PATCH] MB-43580: Avoid running planner if there are no indexes to restore Change-Id: I2ab3ea72b86c5478859cc367b1df311fb7a7e068 --- secondary/manager/restore.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/secondary/manager/restore.go b/secondary/manager/restore.go index acf65be8d..2e2e19269 100644 --- a/secondary/manager/restore.go +++ b/secondary/manager/restore.go @@ -116,6 +116,11 @@ func (m *RestoreContext) computeIndexLayout() (map[string][]*common.IndexDefn, e return nil, err } + if len(m.idxToRestore) == 0 && len(m.tokToRestore) == 0 { + logging.Infof("RestoreContext: nothing to restore") + return nil, nil + } + // associate indexer from image to current cluster m.buildIndexerMapping()