[SERVER-30144] cloneDb.js should awaitReplication after creating view on collection Created: 14/Jul/17  Updated: 30/Oct/23  Resolved: 14/Jul/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.5.11

Type: Bug Priority: Major - P3
Reporter: William Schultz (Inactive) Assignee: William Schultz (Inactive)
Resolution: Fixed 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
Participants:
Linked BF Score: 0

 Description   

The jstests/replsets/cloneDb.js test uses a 3-node replica set and a standalone mongod. It first inserts some documents on the primary of the replica set, and then creates a collection view on the primary. The documents on the primary are inserted with writeConcern=3, but the creation of the collection view is executed without a writeConcern. This means that, when the test clones the database from the SECONDARY to the standalone node, the view might not have actually replicated to the SECONDARY. The standalone node would then fail to clone the view, which causes the test to fail when it checks the view document count. We should await replication after creating the view on the primary to ensure it actually replicates to the SECONDARY before doing the database clones.



 Comments   
Comment by Githook User [ 14/Jul/17 ]

Author:

{u'username': u'will62794', u'name': u'William Schultz', u'email': u'william.schultz@mongodb.com'}

Message: SERVER-30144 cloneDB.js should await replication after creating view
Branch: master
https://github.com/mongodb/mongo/commit/64fb67e843db0287eaf86ca892e8e3f77ca0ca18

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