[SERVER-19298] Use userCreateNS w/options consistently in cloner Created: 06/Jul/15  Updated: 21/Sep/15  Resolved: 08/Jul/15

Status: Closed
Project: Core Server
Component/s: Internal Code, Replication
Affects Version/s: 3.0.0
Fix Version/s: 3.0.5, 3.1.6

Type: Bug Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: RPL 6 07/17/15
Participants:

 Description   

There are various places in the cloner where we call createCollection, instead of userCreateNS (and without the original collection options) which can lead to the collection not containing the same options.

While it is unlikely these places will ever be exercised in real/production use due to the failures plus timing required to trigger them, it is good we clean it up for consistency and accuracy. The only reproduction I could come up with for this would be if a user dropped the collection in the split instant when the cloner releases the lock between creating the collection and starting the copy of the data/indexes-defs. In order to test this fix it was required to manually error during earlier collection creation calls to test all code paths.

If encountered the behavior can affect replication, or any other use of the cloner like copydb, or cloneCollection. for example.



 Comments   
Comment by Githook User [ 08/Jul/15 ]

Author:

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

Message: SERVER-19298: always use collection options when creating collections
Branch: master
https://github.com/mongodb/mongo/commit/9edbe630a70fe1117111015c98dcc068ecd22db6

Comment by Githook User [ 07/Jul/15 ]

Author:

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

Message: SERVER-19298: always use collection options when creating collections
Branch: v3.0
https://github.com/mongodb/mongo/commit/e9a8ecb52b902e71f489b7ad39dd7ca047b80b83

Comment by Githook User [ 07/Jul/15 ]

Author:

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

Message: SERVER-19298: always use collection options when creating collections
Branch: v3.0
https://github.com/mongodb/mongo/commit/11f781a628b5045725c59d8a590258b51a446e88

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