[SERVER-56313] Do not use double as map key, it may trigger unexpected behavior Created: 23/Apr/21  Updated: 29/Oct/23  Resolved: 26/Apr/21

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

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

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

Depending on platform, standard library and CPU microcode, comparing 2 "equal" doubles can yield unexpected results. Double should never be used as a key in container.

The fix should be here:
https://github.com/mongodb/mongo/blob/124ee49878b8fe8a43fda758408178be9db0ccf5/src/mongo/client/connpool.h#L400



 Comments   
Comment by Githook User [ 26/Apr/21 ]

Author:

{'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}

Message: SERVER-56313: Do not use double as map key, it may trigger unexpected behavior
Branch: v4.0
https://github.com/mongodb/mongo/commit/5d3de316e49170687fee2eac1d619f3660a45f66

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