Info
replsetprio1.js has a race condition when initiating the replset. The nodes are initially configured with different priorities, and when initiating the replset, we add one node at a time by calling replsetReconfig. When adding the third node, there could be a concurrent priority takeover that causes primary node to stepdown and failing replsetReconfig command to fail. As a result, the replset initiation process fails.
Top User Comments
xgen-internal-githook commented on Fri, 12 Nov 2021 21:03:38 +0000:
Author:
{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}
Message: SERVER-60946 Retry NotWritablePrimary error when initiating replset to handle concurrent priority takeover.
(cherry picked from commit d2d7164bb02fff924ac787f6d422dffb22ef0b94)
Branch: v4.4
https://github.com/mongodb/mongo/commit/0dc67a2917beba88c718646e628180c8b00f845c
xgen-internal-githook commented on Fri, 12 Nov 2021 18:08:24 +0000:
Author:
{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}
Message: SERVER-60946 Retry NotWritablePrimary error when initiating replset to handle concurrent priority takeover.
(cherry picked from commit d2d7164bb02fff924ac787f6d422dffb22ef0b94)
Branch: v5.1
https://github.com/mongodb/mongo/commit/fbbb0eee2d0f0e26c56dc9bbb3406b47fc7b91cc
xgen-internal-githook commented on Fri, 12 Nov 2021 18:08:24 +0000:
Author:
{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}
Message: SERVER-60946 Retry NotWritablePrimary error when initiating replset to handle concurrent priority takeover.
(cherry picked from commit d2d7164bb02fff924ac787f6d422dffb22ef0b94)
Branch: v5.0
https://github.com/mongodb/mongo/commit/12682a2d8259210a7ab19606985de31fefde252b
xgen-internal-githook commented on Mon, 25 Oct 2021 22:38:51 +0000:
Author:
{'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}
Message: SERVER-60946 Retry NotWritablePrimary error when initiating replset to handle concurrent priority takeover.
Branch: master
https://github.com/mongodb/mongo/commit/d2d7164bb02fff924ac787f6d422dffb22ef0b94