Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2123

Driver should ensure maxTimeMS value sent to server is valid

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.7.0
    • Affects Version/s: 2.4.4
    • Component/s: Read Operations
    • None
    • Fully Compatible

      The .NET driver currently sends the maxTimeMS parameter to the server as a BSON double. The server requires that the value for maxTimeMS be an integral number of milliseconds. When the driver converts a MaxTime TimeSpan value to a maxTimeMS to send to the server it should map values that contain fractional milliseconds to an appropriate integral value.

      Fractional milliseconds should always be adjusted to the next highest integral value.

      We don't want to round down because:

      1. That could result in the server aborting the operation sooner than the application specified
      2. Rounding values smaller than 1.0 down to 0.0 would result in unexpected behavior because the server interprets 0 as meaning no maxTimeMS

        1. MongoError.png
          7 kB
          Andrey Kondratyev [X]

            Assignee:
            Unassigned Unassigned
            Reporter:
            byTimo Andrey Kondratyev [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: