-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
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