Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-68842

Passing in w: NaN for write concern is interpreted as w: 0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Replication
    • Fully Compatible
    • ALL

      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.

            Assignee:
            john.liu@mongodb.com John Liu (Inactive)
            Reporter:
            ali.mir@mongodb.com Ali Mir
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: