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

Densify crashes server when collection has both date and numeric values for the densify field.

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • v5.1
    • Hide

      db.test.insertMany([\{val: new Date()}, \{val: 2}])

      db.test.aggregate([{$densify: {field: "val", range:

      {step: 1, bounds: "full", unit: "day"}

      }}])

       

      Mongod log: "{"t":

      {"$date":"2021-10-07T16:05:59.342+00:00"}

      ,"s":"F", "c":"CONTROL", "id":4757800, "ctx":"conn1","msg":"Writing fatal message","attr":{"message":"std::exception::what(): bad_variant_access\nActual exception type: mpark::bad_variant_access\n"}}"

      Show
      db.test.insertMany( [\{val: new Date()}, \{val: 2}] ) db.test.aggregate([{$densify: {field: "val", range: {step: 1, bounds: "full", unit: "day"} }}])   Mongod log: "{"t": {"$date":"2021-10-07T16:05:59.342+00:00"} ,"s":"F", "c":"CONTROL", "id":4757800, "ctx":"conn1","msg":"Writing fatal message","attr":{"message":"std::exception::what(): bad_variant_access\nActual exception type: mpark::bad_variant_access\n"}}"

      Bad variant access when $densify is called on a collection where the values in the field that is being densified can be either a date or a number.

            Assignee:
            davis.haupt@mongodb.com Davis Haupt (Inactive)
            Reporter:
            davis.haupt@mongodb.com Davis Haupt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: