Operational Defect Database

BugZero found this defect 2530 days ago.

MongoDB | 367607

[SERVER-28487] upgradePrimary should call awaitNodesAgreeOnPrimary() before it gets the primary

Last update date:

12/6/2017

Affected products:

MongoDB Server

Affected releases:

No affected releases provided.

Fixed releases:

3.5.7

Description:

Info

getPrimary() gets the primary, but does not wait for the primary to be "stable". If two nodes decide to run for primary around the same time, they could both win in quick succession, and the first getPrimary() could return the first winner and the second getPrimary() could return the second winner. awaitNodesAgreeOnPrimary() is designed for precisely this situation, waiting for the nodes to agree on a primary to avoid this race. let oldPrimary = this.stepdown(primary); primary = this.getPrimary();   this.upgradeNode(oldPrimary, options, user, pwd);   let newPrimary = this.getPrimary();   if (noDowntimePossible) assert.eq(newPrimary, primary);

Top User Comments

xgen-internal-githook commented on Thu, 4 May 2017 21:47:32 +0000: Author: {u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'} Message: SERVER-28487 call awaitNodesAgreeOnPrimary in upgradePrimary helper in multi_rs.js Branch: master https://github.com/mongodb/mongo/commit/765d5393f604dafccec883e2e36e734d7719557c

Additional Resources / Links

Share:

BugZero Risk Score

Coming soon

Status

Closed

Have you been affected by this bug?

cost-cta-background

Do you know how much operational outages are costing you?

Understand the cost to your business and how BugZero can help you reduce those costs.

Discussion

Login to read and write comments.

Have you ever...

had your data corrupted from a

VMware

bug?

Search:

...