diff options
Diffstat (limited to 'src/mongo/db/dbcommands.cpp')
-rw-r--r-- | src/mongo/db/dbcommands.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index 4b65ba7b6c1..6f6de870f1b 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -1172,15 +1172,15 @@ namespace mongo { } /* Sometimes we cannot set maintenance mode, in which case the call to setMaintenanceMode will - return false. This class does not treat that case as an error which means that anybody - using it is assuming it is ok to continue execution without maintenance mode. This + return a non-OK status. This class does not treat that case as an error which means that + anybody using it is assuming it is ok to continue execution without maintenance mode. This assumption needs to be audited and documented. */ class MaintenanceModeSetter { public: MaintenanceModeSetter(OperationContext* txn) : _txn(txn), maintenanceModeSet( - repl::getGlobalReplicationCoordinator()->setMaintenanceMode(txn, true)) + repl::getGlobalReplicationCoordinator()->setMaintenanceMode(txn, true).isOK()) {} ~MaintenanceModeSetter() { if (maintenanceModeSet) |