[SERVER-35246] Ignore NamespaceNotFound errors when running collMod during checkReplicaSet in replsettest.js Created: 25/May/18  Updated: 29/Oct/23  Resolved: 25/Jul/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.6.7, 4.0.2, 4.1.2

Type: Bug Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Samyukta Lanka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0, v3.6
Sprint: Repl 2018-07-02, Repl 2018-07-16, Repl 2018-07-30
Participants:
Linked BF Score: 37

 Description   

When running checkReplicaSet in replsettest.js, we run collMod on all the collections to wait for any index builds before running awaitReplication. However, if there is a background thread running a command, it could potentially drop a collection after listCollections but before collMod, causing a "NamespaceNotFound" error.

To fix this, check the output of runCommand to see if there was a "NamespaceNotFound" error and if so, ignore it.



 Comments   
Comment by Githook User [ 13/Aug/18 ]

Author:

{'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com', 'username': 'lankas'}

Message: SERVER-35246 Ignore NamespaceNotFound errors when running collMod during checkReplicaSet in replsettest.js

(cherry picked from commit 192b1e24ec53a011656a2063e4c5e70817b63d36)
Branch: v3.6
https://github.com/mongodb/mongo/commit/56856d277eca36dd36e029fee71459318b181e41

Comment by Githook User [ 13/Aug/18 ]

Author:

{'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com', 'username': 'lankas'}

Message: SERVER-35246 Ignore NamespaceNotFound errors when running collMod during checkReplicaSet in replsettest.js

(cherry picked from commit 192b1e24ec53a011656a2063e4c5e70817b63d36)
Branch: v4.0
https://github.com/mongodb/mongo/commit/4789ae14a28e10489628d0cb509f08d01d9e292e

Comment by Githook User [ 25/Jul/18 ]

Author:

{'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com', 'username': 'lankas'}

Message: SERVER-35246 Ignore NamespaceNotFound errors when running collMod during checkReplicaSet in replsettest.js
Branch: master
https://github.com/mongodb/mongo/commit/192b1e24ec53a011656a2063e4c5e70817b63d36

Comment by Spencer Brody (Inactive) [ 29/May/18 ]

FYI max.hirschhorn

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