[SERVER-19909] Consider election race in restore_term.js Created: 12/Aug/15  Updated: 20/Aug/17  Resolved: 14/Aug/15

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.1.7

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Siyuan Zhou
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: RPL 8 08/31/15
Participants:
Linked BF Score: 0

 Description   

restore_term.js assumes the first election will win with term 1, which may not be the case if election race happens. It happens more frequently without timer based election and random timeout, but it is still possible in the new election protocol.



 Comments   
Comment by Githook User [ 14/Aug/15 ]

Author:

{u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}

Message: SERVER-19909 Fix term of insert op in restore_term.js
Branch: master
https://github.com/mongodb/mongo/commit/d156ce8f245c127b20c26b37a706717c2fd2d854

Comment by Githook User [ 12/Aug/15 ]

Author:

{u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}

Message: SERVER-19909 Consider election race in restore_term.js
Branch: master
https://github.com/mongodb/mongo/commit/7c05241d8001a30791732235cea2fff2e52f43e0

Comment by Siyuan Zhou [ 12/Aug/15 ]

An example of election race:
https://logkeeper.mongodb.org/build/55cb72b690413011a243aa44/test/55cb78a0be07c47abf43e66a

Generated at Thu Feb 08 03:52:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.