[SERVER-27046] race between CollectionCloner::_findCallback and CollectionCloner::_insertDocuments Created: 15/Nov/16  Updated: 05/Apr/17  Resolved: 17/Nov/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: 3.4.0-rc3
Fix Version/s: 3.4.2, 3.5.1

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

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4
Sprint: Repl 2016-11-21
Participants:
Linked BF Score: 0

 Description   

While the collection cloner is inserting a single batch of documents into the database in _insertDocuments (before it reaches point where it calls into the collection bulk loader), the getMore command on the sync source may return a failure (for example, collection gets dropped) which terminates the collection cloner by way of the _finishCallback function. _finishCallback destroys the collection bulk loader which maybe trigger an invariant in _insertDocuments running a separate thread.



 Comments   
Comment by Githook User [ 22/Dec/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27046 CollectionCloner should wait for active inserts to complete before returning error from fetching collection documents

(cherry picked from commit 9f5bb772a7727e4235825f00b5885dd8ac5a3147)
Branch: v3.4
https://github.com/mongodb/mongo/commit/1636eb74580f09cc413e81edaa72fa109719c917

Comment by Githook User [ 17/Nov/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-27046 CollectionCloner should wait for active inserts to complete before returning error from fetching collection documents
Branch: master
https://github.com/mongodb/mongo/commit/9f5bb772a7727e4235825f00b5885dd8ac5a3147

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