[SERVER-27678] CollectionCloner should call _finishCallback at most once Created: 13/Jan/17  Updated: 05/Apr/17  Resolved: 21/Jan/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.4.2, 3.5.2

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
depends on SERVER-27677 CollectionBulkLoader::_releaseResourc... Closed
is depended on by SERVER-27611 DatabaseCloner::shutdown() does not s... Closed
is depended on by SERVER-27775 fix race in collection_cloner_test Co... Closed
Duplicate
is duplicated by SERVER-27944 mongodb 3.4.1 OOM when add new node... Closed
is duplicated by SERVER-28241 OOM error while adding a member to re... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Backport Requested:
v3.4
Sprint: Repl 2017-01-23
Participants:
Linked BF Score: 0

 Description   

Once CollectionCloner starts fetching documents from the remote server, there are two parallel threads of execution within the CollectionCloner that can lead to _finishCallback() being invoked. We should ensure that _finishCallback() is called with the first completion/failure status AFTER both threads of execution have been joined.



 Comments   
Comment by Githook User [ 21/Jan/17 ]

Author:

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

Message: SERVER-27678 CollectionCloner waits for pending _findCallback and _insertDocuments tasks to complete before invoking completion function.

(cherry picked from commit 23d8d6530a044494746c919aa6b73d5317b6b667)
Branch: v3.4
https://github.com/mongodb/mongo/commit/bdece8fbb3e8e39e406b461ccb4933e127b4a13a

Comment by Githook User [ 21/Jan/17 ]

Author:

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

Message: SERVER-27678 refactor CollectionCloner to support placeholder onCompletionGuard argument to CollectionCloner::_findCallback and _insertDocuments

(cherry picked from commit 3d2baddd174b9a4cf683047a2bde624f1e1e7ae4)
Branch: v3.4
https://github.com/mongodb/mongo/commit/9b8f3b59e69619366128aa86cd6c88cc11c8fa1f

Comment by Githook User [ 21/Jan/17 ]

Author:

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

Message: SERVER-27678 moved DataReplicator::OnCompletionGuard into its own library

(cherry picked from commit 57a0c3d2f7f438d20ce2b078a249c048c7d234d0)
Branch: v3.4
https://github.com/mongodb/mongo/commit/fb028112d3bda109baf9987cfd5986a4475c79bf

Comment by Githook User [ 21/Jan/17 ]

Author:

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

Message: SERVER-27678 CollectionCloner waits for pending _findCallback and _insertDocuments tasks to complete before invoking completion function.
Branch: master
https://github.com/mongodb/mongo/commit/23d8d6530a044494746c919aa6b73d5317b6b667

Comment by Githook User [ 21/Jan/17 ]

Author:

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

Message: SERVER-27678 refactor CollectionCloner to support placeholder onCompletionGuard argument to CollectionCloner::_findCallback and _insertDocuments
Branch: master
https://github.com/mongodb/mongo/commit/3d2baddd174b9a4cf683047a2bde624f1e1e7ae4

Comment by Githook User [ 20/Jan/17 ]

Author:

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

Message: SERVER-27678 moved DataReplicator::OnCompletionGuard into its own library
Branch: master
https://github.com/mongodb/mongo/commit/57a0c3d2f7f438d20ce2b078a249c048c7d234d0

Comment by Githook User [ 19/Jan/17 ]

Author:

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

Message: Revert "SERVER-27678 moved DataReplicator::OnCompletionGuard into its own library"

This reverts commit 9edfc4c8ba273d54ecdc31c1fc0eb8c6a42ccbc4.
Branch: master
https://github.com/mongodb/mongo/commit/7bf2874d0fe92c5503f9cde86ac9e341d1889000

Comment by Githook User [ 19/Jan/17 ]

Author:

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

Message: SERVER-27678 moved DataReplicator::OnCompletionGuard into its own library
Branch: master
https://github.com/mongodb/mongo/commit/9edfc4c8ba273d54ecdc31c1fc0eb8c6a42ccbc4

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