[SERVER-25253] set Fetcher::_inShutdown immediately after locking in Fetcher::cancel() Created: 25/Jul/16  Updated: 28/Sep/16  Resolved: 25/Jul/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.3.10
Fix Version/s: 3.3.11

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

Issue Links:
Depends
Related
related to SERVER-25913 hold mutex while scheduling getmore r... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 18 (08/05/16)
Participants:
Linked BF Score: 0

 Description   

There is a race in the new initial sync code where Fetcher::cancel() can be called while we're in a previous batch's _callback() but before the next batch is scheduled. This means that Fetcher::cancel() is called when the callback handle is invalid, and thus Fetcher::_inShutdown is never set to true. The next batch is then scheduled and _inShutdown is never set to false.



 Comments   
Comment by Githook User [ 27/Jul/16 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-25253 test that fetcher is in shutdown after cancel is called
Branch: master
https://github.com/mongodb/mongo/commit/8f7b70d1aa82d18bb16e4ace43cbb24b182a0cb6

Comment by Githook User [ 25/Jul/16 ]

Author:

{u'username': u'judahschvimer', u'name': u'Judah Schvimer', u'email': u'judah@mongodb.com'}

Message: SERVER-25253 set Fetcher::_inShutdown immediately after locking in Fetcher::cancel()
Branch: master
https://github.com/mongodb/mongo/commit/72728d0429e74e1bec1715b4339f60159b0d6b4e

Generated at Thu Feb 08 04:08:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.