Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-61106

Time-series bucket min/max summaries incorrect for the same canonical type but different underlying type

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0, 5.1.0-rc3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v5.1
    • Hide
      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();
      
      Show
      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();
    • Execution Team 2021-11-01, Execution Team 2021-11-15

      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.

       

            Assignee:
            dan.larkin-york@mongodb.com Dan Larkin-York
            Reporter:
            gregory.wlodarek@mongodb.com Gregory Wlodarek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: