diff options
author | Blake Oler <blake.oler@mongodb.com> | 2019-01-14 14:48:09 -0500 |
---|---|---|
committer | Blake Oler <blake.oler@mongodb.com> | 2019-02-05 14:37:32 -0500 |
commit | 46c77f1f2abc4c4dc44957ea8838dd59e01a2e41 (patch) | |
tree | c846937825f7c8c0414e9a8eda434c928b245acd /src/mongo/db/s | |
parent | 17f25a473b0f1f7f132fecbc41581224aa324828 (diff) | |
download | mongo-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.cpp | 9 |
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; |