When a document inserted into a time-series collection contains a field which has a empty field name, and that document does not specify a value for the collection's meta field, then the field with the empty field name does not get tracked by the bucket's min/max.
const coll = db.coll; const bucketsColl = db.system.buckets.coll; assert.commandWorked( db.createCollection(coll.getName(), {timeseries: {timeField: "t", metaField: "m"}})); assert.commandWorked(coll.insert({t: ISODate(), _id: 0, "": 0})); // note that no "m" is provided const bucket = bucketsColl.find().toArray()[0]; assert(bucket.control.min.hasOwnProperty(""), bucket); // this assertion fails assert(bucket.control.max.hasOwnProperty(""), bucket); // this assertion fails
- is related to
-
SERVER-86473 Investigate control field and data field mismatch in a time-series bucket
- Closed
- related to
-
SERVER-86451 Time-series checks in validate should error not warn in testing
- Closed