-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
ALL
The following repro will uassert, when this is valid data + query to run on a collection. I believe the root cause is from SERVER-67816, since the control.max for time is rounded up to 1970 for the pre-1970 data bucket.
docs = [ { "t" : ISODate("1970-01-01T00:00:00Z"), "m" : 1, "_id" : 0 }, { "t" : ISODate("1969-12-31T23:59:59.999Z"), "m" : 0, "_id" : 1 } ] const coll = db.c; assert.commandWorked(db.createCollection(coll.getName(), { timeseries: {timeField: 't', metaField: 'm'}, })); assert.commandWorked(coll.insert(docs)) jsTestLog(coll.aggregate({$sort: {t: 1}}).toArray()) // uassert, but this is a valid sort // What do the buckets look like? jsTestLog(db.system.buckets.c.find().toArray()) // control.max for time is rounded up, possibly the cause
- is fixed by
-
SERVER-94207 Time-series $match on dates before 1970 can miss documents
- Closed