[SERVER-68487] add BSONElement method to check for NaN field values Created: 02/Aug/22  Updated: 29/Oct/23  Resolved: 02/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.2.23, 6.0.1, 4.4.16, 5.0.11, 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-68359 Prevent TTLMonitor from processing in... Closed
is related to SERVER-68477 Improve NaN-handling for expireAfterS... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.0, v5.0, v4.4, v4.2
Sprint: Execution Team 2022-08-08
Participants:

 Description   

The BSONElement contains a number of methods that coerce the field value into the range for a given type. Some of these methods have internal rules for converting NaN values, which apply to the Double and Decimal types specifically.

Some use cases may require different handling for NaN values rather than depend on the implicit conversion rules.

See BSONElement::safeNumberLong() for an example.



 Comments   
Comment by Benety Goh [ 03/Aug/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-68487 add BSONElement::isNaN()

(cherry picked from commit ed25ebe0d87dd2521fbfc5534ba7af7de69aad4d)
Branch: v4.2
https://github.com/mongodb/mongo/commit/9f3fe4b1546b6b3ab09345905a3163f19771cc70

Comment by Githook User [ 03/Aug/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-68487 add BSONElement::isNaN()

(cherry picked from commit ed25ebe0d87dd2521fbfc5534ba7af7de69aad4d)
Branch: v4.4
https://github.com/mongodb/mongo/commit/8cc10fbb4a54982fa8631f92aa09eb5fe3bed8d9

Comment by Benety Goh [ 03/Aug/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-68487 add BSONElement::isNaN()

(cherry picked from commit ed25ebe0d87dd2521fbfc5534ba7af7de69aad4d)
Branch: v5.0
https://github.com/mongodb/mongo/commit/80418c74f6851800f0516b0c8daecf469c295c9f

Comment by Githook User [ 02/Aug/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-68487 add BSONElement::isNaN()

(cherry picked from commit ed25ebe0d87dd2521fbfc5534ba7af7de69aad4d)
Branch: v6.0
https://github.com/mongodb/mongo/commit/ad6b4935e14bf148aacb5ddeed4b083f636de6d6

Comment by Benety Goh [ 02/Aug/22 ]

Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-68487 add BSONElement::isNaN()
Branch: master
https://github.com/mongodb/mongo/commit/ed25ebe0d87dd2521fbfc5534ba7af7de69aad4d

Generated at Thu Feb 08 06:10:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.