[SERVER-61106] Time-series bucket min/max summaries incorrect for the same canonical type but different underlying type Created: 29/Oct/21  Updated: 29/Oct/23  Resolved: 29/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0, 5.1.0-rc3

Type: Bug Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Dan Larkin-York
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
is caused by SERVER-56717 Use faster value comparison for Times... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.1
Steps To Reproduce:

use test;
 
var coll = db.getCollection("a");
coll.drop()
 
var timeField = "time";
var metaField = "meta";
db.createCollection("a", {timeseries: {timeField: timeField, metaField: metaField}});
 
 
coll.insert({[timeField]: ISODate(), [metaField]: 1, x: Number(1.0)});
coll.insert({[timeField]: ISODate(), [metaField]: 1, x: NumberLong(10)});
 
db.getCollection("system.buckets.a").find({}).pretty();

Sprint: Execution Team 2021-11-01, Execution Team 2021-11-15
Participants:

 Description   

Insert the following measurements:

{x: Number(1.0)}
{x: NumberLong(10)}

In 5.0:

"control" : {
        "min" : {
                "x" : 1
        },
        "max" : {
                "x" : NumberLong(10)
        }
}

In 5.1/5.2:

"control" : {
        "min" : {
                "x" : 1
        },
        "max" : {
                "x" : 1
        }
}

The bucket has both measurements in both binaries:

"data" : {
        "_id" ...
        "x" : {
                "0" : 1,
                "1" : NumberLong(10)
        },
        "time" ...
}

We'd want the same min/max summaries from 5.0 in 5.1/5.2, to let us know we have measurements ranging from 1 -> 10 in the bucket.

 



 Comments   
Comment by Githook User [ 30/Oct/21 ]

Author:

{'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}

Message: SERVER-61106 Use woCompare to generate timeseries summaries
Branch: v5.1
https://github.com/mongodb/mongo/commit/8ec2e9cefaaa92e83d5a0cecd7c7d947eca32f4e

Comment by Githook User [ 29/Oct/21 ]

Author:

{'name': 'Dan Larkin-York', 'email': 'dan.larkin-york@mongodb.com', 'username': 'dhly-etc'}

Message: SERVER-61106 Use woCompare to generate timeseries summaries
Branch: master
https://github.com/mongodb/mongo/commit/aa3c6eb2c7b4f76521004461e41b4a8b2022586e

Generated at Thu Feb 08 05:51:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.