-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
If a user inserts a document into MongoDB without an _id field, ordinarily either the client or mongod will automatically generate and add an _id field.
mongod does not do this for documents inserted to time series collections. This makes sense since the documents aren't stored directly in a collection, but rather in the buckets collection, which has its own autogenerated _id fields.
However, if a user expects that inserting a document like {a: 1, b: 1} will autogenerate an _id field and insert a document like {_id: ObjectId(...), a: 1, b: 1}, they may be surprised when this doesn't happen for time series collections.
We should discuss whether or not it's worth having mongod autogenerate _id fields for documents inserted into a time-series collection, and if so, we should maybe also file tickets for drivers which don't implement _id autogeneration.