[SERVER-39373] Remove the 'ns' field requirement on index specs Created: 04/Feb/19  Updated: 22/Jul/19  Resolved: 22/Jul/19

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

Type: Improvement Priority: Major - P3
Reporter: Louis Williams Assignee: Gregory Wlodarek
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-41696 Stop generating the 'ns' field for in... Closed
Sprint: Execution Team 2019-07-29
Participants:

 Description   

Index specs are required to have an 'ns' field, but when we replicate the 'createIndex' oplog entry, we strip away the 'ns' field and then add it back when applying the oplog entry.

Storing the 'ns' field on index specs unnecessarily complicates the catalog during collection renames, and in unused in general.



 Comments   
Comment by Dianna Hohensee (Inactive) [ 10/Jul/19 ]

renameCollection is another place where we have special handling around stripping out the 'ns' field of an index spec: https://github.com/mongodb/mongo/blob/d15b1f2e036e262f8ea976e04780aa366fa20ad4/src/mongo/db/catalog/rename_collection.cpp#L561-L570

Comment by Dianna Hohensee (Inactive) [ 02/Jul/19 ]

gregory.wlodarek Louis and I came across this in our adventures in the backlog and thought it might be a dupe of some of the work you're currently doing.

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