[SERVER-17123] Always stop background sync thread when we become primary Created: 29/Jan/15  Updated: 25/Jan/17  Resolved: 03/Feb/15

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.0.0-rc7
Fix Version/s: 3.0.0-rc8, 3.1.0

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
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
Backport Completed:
Participants:
Linked BF Score: 0

 Description   

If a node is primary for a very short time the bgsync thread may never notice it is primary and stop() itself. If that doesn't happen, then it will never call start() when it becomes secondary again, and thus _lastOpFetched will hold the last op it received the last time it was secondary, missing any ops that were written during the brief window it was primary.



 Comments   
Comment by Githook User [ 04/Feb/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-17123 Wait for the BackgroundSync thread to stop before enabling writes when becoming primary

(cherry picked from commit 3e411144a9bfb4b08d98cd26a778453e04e92a0e)
Branch: v3.0
https://github.com/mongodb/mongo/commit/dbc52f024a2e679038f85bc818bb9b5c7c8c9acd

Comment by Githook User [ 03/Feb/15 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-17123 Wait for the BackgroundSync thread to stop before enabling writes when becoming primary
Branch: master
https://github.com/mongodb/mongo/commit/3e411144a9bfb4b08d98cd26a778453e04e92a0e

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