[SERVER-60536] Add uasserts for type mismatches in collection for $densify Created: 07/Oct/21  Updated: 29/Oct/23  Resolved: 08/Oct/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc1

Type: Bug Priority: Major - P3
Reporter: Davis Haupt (Inactive) Assignee: Davis Haupt (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-60539 Densify crashes server when collectio... Closed
Problem/Incident
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.1
Steps To Reproduce:

in the shell:

db.test.insertMany([

{val: 1}

,

{val: 3}

,

{val: 5}

])

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

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

}}])

tassert "PlanExecutor error during aggregation :: caused by :: Unit must not be specified with non-date values" with code 5733506.

 

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"}}"

Sprint: QO 2021-10-18
Participants:
Linked BF Score: 45

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

Author:

{'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}

Message: SERVER-60536 add uasserts for type mismatches in collection for $densify
Branch: v5.1
https://github.com/mongodb/mongo/commit/014676de0a388a1c2e95d050fb1eadcb42421cde

Comment by Githook User [ 08/Oct/21 ]

Author:

{'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}

Message: SERVER-60536 add uasserts for type mismatches in collection for $densify
Branch: master
https://github.com/mongodb/mongo/commit/2984c3f85b30d9c9b7a36b76be9f0993b702dfce

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