Skip to content

Commit e3a8cb0

Browse files
authored
feat(shell-api): add reconfigForPSASet helper MONGOSH-702 (#896)
This provides the same functionality as the newly introduced legacy shell equivalent. Notable differences are: - This does some type cleanup around the replset code - This is more verbose, and prints: - A warning if the new member is already in the existing config with a different _id but the same hostname - Indicators that retrying is still going on when it is - The second reconfig commmand, if it failed, so that the user can retry manually - This performs exponential backoff while waiting for the second reconfig to succeed - This uses a fixed number of attempts (12) instead of a fixed duration (90 seconds) for performing the second reconfig
1 parent c265498 commit e3a8cb0

File tree

3 files changed

+415
-104
lines changed

3 files changed

+415
-104
lines changed

packages/i18n/src/locales/en_US.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,11 @@ const translations: Catalog = {
13991399
description: 'Reconfigures an existing replica set, overwriting the existing replica set configuration.',
14001400
example: 'rs.reconfig()'
14011401
},
1402+
reconfigForPSASet: {
1403+
link: 'https://docs.mongodb.com/manual/reference/method/rs.reconfigForPSASet',
1404+
description: 'Reconfigures an existing replica set, overwriting the existing replica set configuration, if the reconfiguration is a transition from a Primary-Arbiter to a Primary-Secondary-Arbiter set.',
1405+
example: 'rs.reconfigForPSASet(indexOfNewMemberInMembersArray, config)'
1406+
},
14021407
conf: {
14031408
link: 'https://docs.mongodb.com/manual/reference/method/rs.conf',
14041409
description: 'Calls replSetConfig',

0 commit comments

Comments
 (0)