From 234668b6b338ca005cf9a35f20a38a47416162b6 Mon Sep 17 00:00:00 2001 From: Hossain Mahmud Date: Mon, 24 Jan 2022 12:16:07 +0600 Subject: [PATCH] Replace rs.secondaryOk() with rs.slaveOk() (#1371) Signed-off-by: hmsayem --- pkg/backup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/backup.go b/pkg/backup.go index 8ec07502b..3754113f8 100644 --- a/pkg/backup.go +++ b/pkg/backup.go @@ -647,7 +647,7 @@ func lockConfigServer(configSVRDSN, secondaryHost string) error { "config", "--host", secondaryHost, "--quiet", - "--eval", "rs.secondaryOk(); db.BackupControl.find({ '_id' : 'BackupControlDocument' }).readConcern('majority');", + "--eval", "rs.slaveOk(); db.BackupControl.find({ '_id' : 'BackupControlDocument' }).readConcern('majority');", }, adminCreds...) if err := sh.Command(MongoCMD, args...).UnmarshalJSON(&v); err != nil {