[SERVER-56391] Implement date overflow check in SBE Created: 27/Apr/21  Updated: 29/Apr/21  Resolved: 29/Apr/21

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

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

Issue Links:
Duplicate
duplicates SERVER-56284 SBE $add with Date and NumberDecimal ... Closed
Operating System: ALL
Sprint: Query Execution 2021-05-03
Participants:

 Description   

Code below is a simplified repro from this fuzzer failure.

It gives PlanExecutor error during aggregation :: caused by :: date overflow in $add error when executed with classic engine and object with invalid date ISODate("0NaN-NaN-NaNTNaN:NaN:NaNZ") when executed with SBE.

(function() {
 
db.test.drop();
db.test.insertOne({num: NaN});
 
const results = db.test.aggregate([
    {
        "$project" : {
            "a" : {
                "$add" : [
                    ISODate("2019-12-29T03:22:55.159Z"),
                    "$num"
                ]
            }
        }
    }
]).toArray();
print(tojson(results));
 
}());



 Comments   
Comment by Justin Seyster [ 29/Apr/21 ]

After investigating, we found that the proposed fix for SERVER-56284 does indeed address this issue as well.

Comment by Anton Korshunov [ 28/Apr/21 ]

nikita.lapkov It could be related to SERVER-56284.

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