[SERVER-20892] resmoke.py should wait for initial sync to finish before starting any tests Created: 12/Oct/15  Updated: 12/Aug/16  Resolved: 13/Oct/15

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.1.9
Fix Version/s: 3.2.0-rc0

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
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
Steps To Reproduce:

python buildscripts/resmoke.py --executor core_small_oplog jstests/core/geo_mapreduce2.js

Sprint: QuInt B (11/02/15)
Participants:
Linked BF Score: 0

 Description   

resmoke.py only verifies that the master and slave in the deployment are reachable, but does not wait for the slave to finish its initial sync. It is possible for a test to finish before the initial sync such that when the slave goes to apply the oplog entries, it causes an error. For example, renaming a collection could fail due to the target namespace already existing on the slave from the initial clone.

class MasterSlaveFixture(interface.ReplFixture):
    ...
 
    def await_ready(self):
        self.master.await_ready()
        self.slave.await_ready()

The solution is to do a replicated write of w=2 during the await_ready() function before running any tests.



 Comments   
Comment by Eric Milkie [ 12/Aug/16 ]

Note that this might not work as intended, as initial sync on a slave is throttled and interleaved with the processing of oplog entries. A definitive way to see if it has cloned all db's is to query local.sources and check for the presence of dbsNextPass or incompleteCloneDbs fields.

Comment by Githook User [ 13/Oct/15 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-20892 Fix issue with resmoke.py not waiting for initial sync.
Branch: master
https://github.com/mongodb/mongo/commit/cda9ac3ae9c629fbbd04819fecc8a74126ed6ea0

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