[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: |
|
||||
| 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: |