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

Create a Timeout class for use in the server

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None

      Description

      We currently have no consistent way of passing timeouts around in the server. Some places pass timeouts as Seconds or Milliseconds, some pass timeouts as bare doubles and rely on code comments to state what granularity they express. Some methods use boost::optional to express whether a timeout has been set, and some provide a default value instead, but do this inconsistently (we alternate between using "0" and "-1" to express "no timeout specified"). All these inconsistencies make it very easy to create bugs like SERVER-27358.

      We should implement a Timeout class to uniformly express timeouts in the server. This class should be flexible enough to accept Seconds or Milliseconds. Because we rely on "explicit passed-in value or a default" logic, this class should also express optionality in a sane way.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: