[SERVER-68842] Passing in w: NaN for write concern is interpreted as w: 0 Created: 15/Aug/22 Updated: 29/Oct/23 Resolved: 08/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ali Mir | Assignee: | John Liu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Replication
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
As part of the NaN conversion audit of replication, we found that passing in w: NaN as an argument for setting write concern, the NaN is evaluated as 0. This is because we use safeNumberLong() to extract the "w" value, and this function evaluates NaN as 0. This issue exists all the way back to 4.4. |
| Comments |
| Comment by Githook User [ 08/Mar/23 ] |
|
Author: {'name': 'John Liu', 'email': 'john.m.liu2@gmail.com', 'username': 'john-m-liu'}Message: |
| Comment by Ali Mir [ 15/Aug/22 ] |
|
dave.rolsky@mongodb.com yep, accidentally made it REP but moved the ticket over already. Thanks for the heads up! |
| Comment by Dave Rolsky [ 15/Aug/22 ] |
|
ali.mir@mongodb.com Did you mean to put this in the SERVER project? |