[SERVER-25662] Data replicator should stop initial sync and shut down immediately when server is shut down Created: 17/Aug/16  Updated: 25/Jan/17  Resolved: 15/Nov/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.4.0-rc4

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

Issue Links:
Depends
depends on SERVER-26999 race between DatabasesCloner::_succee... Closed
is depended on by SERVER-25068 Make small_oplog_rs_initsync passthro... Closed
Related
related to SERVER-27052 Add asynchronous operation support to... Closed
is related to SERVER-17081 Resync command under write load can f... Closed
is related to SERVER-23759 shutting down a node while replicatio... Closed
is related to SERVER-26969 add data replicator test case for shu... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2016-08-29, Repl 2016-09-19, Repl 2016-10-10, Repl 2016-11-21
Participants:
Linked BF Score: 0

 Description   

Currently if mongod is shutdown during initialsync, it will wait for initial sync to terminate before finishing. Since the mongod is partially shutdown initial sync will fail and it will wait to fail 10 times before finally failing and shutting down. Rather, when the ReplicationCoordinatorImpl shuts down, it should shut down the data replicator which should tell initial sync to stop with a ShutdownInProgress status.



 Comments   
Comment by Githook User [ 15/Nov/16 ]

Author:

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

Message: SERVER-25662 DataReplicator cleanup

removed _scheduleFetch_inlock() and _fetcherPaused
renamed _state to _dataReplicatorState
DataReplicator::_anyActiveHandles_inlock() should shutdown last oplog entry fetcher
DataReplicator::shutdown() no longer requires an operation context
removed unnecessary references to DataReplicatorState::Uninitialized
removed unused sync source checking from doNextActions
collapse overloaded versions of _scheduleApplyBatch
merged _doNextActions_inlock() and _doNextActions_Steady_inlock()
Branch: master
https://github.com/mongodb/mongo/commit/b476c357ac3bee4134d8fca884258460b214ebd8

Comment by Githook User [ 14/Nov/16 ]

Author:

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

Message: SERVER-25662 ReplicationCoordinatorImpl::shutdown() should release data replicator shared_ptr before shutting down external state
Branch: master
https://github.com/mongodb/mongo/commit/8b07dc8933006c20de3111eae5face52320ab45a

Comment by Githook User [ 14/Nov/16 ]

Author:

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

Message: SERVER-25662 DataReplicator callbacks should check shutdown flag before proceeding
Branch: master
https://github.com/mongodb/mongo/commit/239aa95c1cac4ef769beb9644e6f93fe366ee56c

Comment by Githook User [ 12/Nov/16 ]

Author:

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

Message: SERVER-25662 signal shutdown event at most once in _doNextActions()
Branch: master
https://github.com/mongodb/mongo/commit/a0e8fd87e1c68a0a1f8b1786f423c00eab777d8a

Comment by Githook User [ 12/Nov/16 ]

Author:

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

Message: SERVER-25662 DataReplicator::shutdown() should signal initial sync finish event after setting status
Branch: master
https://github.com/mongodb/mongo/commit/63403bb24d6db692f3f03ce5c9d65147678aa044

Comment by Githook User [ 09/Nov/16 ]

Author:

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

Message: SERVER-25662 added log message for oplog fetcher completion to the data replicator
Branch: master
https://github.com/mongodb/mongo/commit/7d68067e5a6272bb463acc4e7a6c6a144148039c

Comment by Githook User [ 09/Nov/16 ]

Author:

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

Message: SERVER-25662 removed non-initial sync functionality from Data Replicator
Branch: master
https://github.com/mongodb/mongo/commit/e20c8f98eb6e060cc6f46ee60a2683ea7043f1a1

Comment by Githook User [ 09/Nov/16 ]

Author:

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

Message: Revert "SERVER-25662: rework DR shutdown and finishing initial sync"

This reverts commit 5ecb92a02cef012649f67606a12a7956aebba65f.
Branch: master
https://github.com/mongodb/mongo/commit/30cc39f613de9b025ba950ae59fc446bd3c978e1

Comment by Githook User [ 04/Nov/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: rework DR shutdown and finishing initial sync
Branch: master
https://github.com/mongodb/mongo/commit/5ecb92a02cef012649f67606a12a7956aebba65f

Comment by Githook User [ 28/Oct/16 ]

Author:

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

Message: SERVER-25662 remove executor diagnostic output from Fetcher::toString() result
Branch: master
https://github.com/mongodb/mongo/commit/bf4385aed5e528a8cf1edb7955c8c2164dda04f0

Comment by Githook User [ 14/Oct/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: add diagnostics string to thread pool executor
Branch: master
https://github.com/mongodb/mongo/commit/c5e6441c6efc20d93aeac366497d91aa9380426f

Comment by Githook User [ 06/Oct/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: consolidate cleanup in doInitialSync attempt
Branch: master
https://github.com/mongodb/mongo/commit/2da41d6cb9a67271a99fddaa452383ef953caa95

Comment by Githook User [ 06/Oct/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: synchronize stopping data replication
Branch: master
https://github.com/mongodb/mongo/commit/94a14bac8b243fd95a75eb506084cb3055765f59

Comment by Githook User [ 27/Sep/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: pass runner OperationContext* to 3.2 initial sync code
Branch: master
https://github.com/mongodb/mongo/commit/7f40db62b8f343db215024b45e746b9ea4fc4e86

Comment by Githook User [ 26/Sep/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: use runner for initial-sync/resync
Branch: master
https://github.com/mongodb/mongo/commit/07f053994e2693bfb5a5ee690a1ecea105f0ba83

Comment by Githook User [ 26/Sep/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: add more diagnostics to fetcher/retry-policy toString output
Branch: master
https://github.com/mongodb/mongo/commit/ad356543d3be3b1414d59fe081a3e220f15fe1f5

Comment by Githook User [ 19/Sep/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: print initial sync time in seconds
Branch: master
https://github.com/mongodb/mongo/commit/b0f32d915624ec84ff75bca5b6364837708ad035

Comment by Githook User [ 19/Sep/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: Print TestAssertionFailureException before throwing in unit tests.
Branch: master
https://github.com/mongodb/mongo/commit/11303e7cee2e21744b014caa5693cc2c015a2687

Comment by Githook User [ 19/Sep/16 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-25662: exit initial sync failpoints when initial sync fails
Branch: master
https://github.com/mongodb/mongo/commit/baa1d412bae7f291004912fbd30b48b92f851fde

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