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

Use safeNumberLong() to parse wTimeout from command

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.3
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • ALL
    • Repl 2020-01-27, Repl 2020-02-10
    • 95

      We currently parse the wTimeout field of a writeConcern object using numberInt(). However, the documentation for numberInt() states that we will get undefined behavior for cases like when given a double too large/small to be expressed as an int or a double that is NaN. The documentation suggests using safeNumberLong() instead.

            Assignee:
            jason.chan@mongodb.com Jason Chan
            Reporter:
            jason.chan@mongodb.com Jason Chan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: