summaryrefslogtreecommitdiff
path: root/src/mongo/db/s
diff options
context:
space:
mode:
authorBlake Oler <blake.oler@mongodb.com>2019-01-14 14:48:09 -0500
committerBlake Oler <blake.oler@mongodb.com>2019-02-05 14:37:32 -0500
commit46c77f1f2abc4c4dc44957ea8838dd59e01a2e41 (patch)
treec846937825f7c8c0414e9a8eda434c928b245acd /src/mongo/db/s
parent17f25a473b0f1f7f132fecbc41581224aa324828 (diff)
downloadmongo-46c77f1f2abc4c4dc44957ea8838dd59e01a2e41.tar.gz
SERVER-38957 Allow a failed changelog write in movePrimary's cleanupOnError to silently fail.
(cherry picked from commit 9cf00022b936cdb3c2234235d5aaa6be7ef6146a)
Diffstat (limited to 'src/mongo/db/s')
-rw-r--r--src/mongo/db/s/move_primary_source_manager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/s/move_primary_source_manager.cpp b/src/mongo/db/s/move_primary_source_manager.cpp
index 3a2ceda9a3e..4818c85f47f 100644
--- a/src/mongo/db/s/move_primary_source_manager.cpp
+++ b/src/mongo/db/s/move_primary_source_manager.cpp
@@ -326,14 +326,17 @@ void MovePrimarySourceManager::cleanupOnError(OperationContext* opCtx) {
return;
}
- try {
- uassertStatusOK(Grid::get(opCtx)->catalogClient()->logChange(
+ Grid::get(opCtx)
+ ->catalogClient()
+ ->logChange(
opCtx,
"movePrimary.error",
_dbname.toString(),
_buildMoveLogEntry(_dbname.toString(), _fromShard.toString(), _toShard.toString()),
- ShardingCatalogClient::kMajorityWriteConcern));
+ ShardingCatalogClient::kMajorityWriteConcern)
+ .ignore();
+ try {
_cleanup(opCtx);
} catch (const ExceptionForCat<ErrorCategory::NotMasterError>& ex) {
BSONObjBuilder requestArgsBSON;