This can result in incorrect control.min time values.
It looks like the min/max time are still valid bounds: that range still includes every event in the bucket. For example:
> db.createCollection('ts', {timeseries:{timeField:'t',metaField:'m'}})
|
{ "ok" : 1 }
|
> db.ts.insert({t: ISODate('1969-01-01T00:00:12.345')})
|
WriteResult({ "nInserted" : 1 })
|
> db.system.buckets.ts.find().pretty()
|
{
|
"_id" : ObjectId("fe1eccbc6f22cc96f1dd557f"),
|
"control" : {
|
"min" : {
|
// Tight lower bound, not rounded.
|
"t" : ISODate("1969-01-01T00:00:12.345Z")
|
},
|
"max" : {
|
// Rounded upper bound, not tight.
|
"t" : ISODate("1969-01-01T00:01:00Z")
|
}
|
},
|
"data" : ...
|
}
|
So this breaks a couple other assumptions:
- control.min.time is not rounded (This affects routing: SERVER-77889.)
- control.min.time is not equal to the time encoded in _id
- control.max.time is not a tight bound (This affect last-point queries: SERVER-77888.)
|