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

Audit server commands for accepted numeric types and accept int32 where necessary

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2022-02-21

      Some server commands (e.g. replSetResizeOplog) expect a subset of their parameters to be of BSON type double, and reject other numeric types.

      This worked well for the legacy shell, which sent its numeric values as double by default. However, in mongosh we intentionally decided to use the Node.js driver’s behavior, which diverges and passes numbers that can be represented as BSON int32}}s as such. For example, {{db.adminCommand({ replSetResizeOplog: 1, size: 990 }) is rejected by current server versions when sent from mongosh.

      Ideally, the server should accept other numeric types in the places where it expects a double, or at least int32 as an alternative.

            Assignee:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: