Info
movePrimary can return the error 'it is already the primary' and is asserted in mongos_validate_writes.js. Instead, use ensurePrimaryShard, which handles and ignores this error. It's fine to ignore this error because it means that the goal is already accomplished, which randomly may be the case.
Top User Comments
xgen-internal-githook commented on Tue, 11 Jul 2017 17:36:48 +0000:
Author:
{u'username': u'DiannaHohensee', u'name': u'Dianna Hohensee', u'email': u'dianna.hohensee@10gen.com'}
Message: SERVER-30067 Use ensurePrimaryShard instead of movePrimary in mongos_validate_writes.js
Branch: master
https://github.com/mongodb/mongo/commit/eb43e76f419566c24624067edc6ae723ac57865f