-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
Fully Compatible
-
ALL
-
v8.0
-
200
Repro:
docs = [ { "t" : ISODate("1969-12-31T23:59:59.999Z"), "m" : { }, "_id" : 0 } ] const coll = db.c; assert.commandWorked(db.createCollection(coll.getName(), { timeseries: {timeField: 't', metaField: 'm'}, })); assert.commandWorked(coll.insert(docs)) jsTestLog(db.system.buckets.c.find().toArray()) query = [ { "$group" : { "_id" : "$t", "m" : { "$max" : "$t" } } } ] jsTestLog(coll.aggregate(query).toArray()) // "m" contains the wrong result (rounded)
The issue appears to be from the "control.max" field for time being rounded up to a different date, and then being used in computing the max in the $group.
- is related to
-
SERVER-67816 Time-series bucket rounding for pre-1970 dates behaves unexpectedly
- Closed
-
SERVER-94614 Use helpers from bsoncolumn_expressions.h to calculate TS bucket min/max
- Backlog
- related to
-
SERVER-96974 Audit all optimizations in bucket unpacking for extended range buckets
- Backlog