Improve Deadline Implementation

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      These improvement suggestion came about after working on SERVER-93077 (which deals with running commands that block)

      In operation_context.h, getExpirationDateForWaitForValue() is private so the current solution to calculate a deadline isĀ 
      Date_t::now() + Milliseconds(SOME_NUM). Thus, getExpirationDateForWaitForValue() cannot be called on an OperationContext object. Could this introduce discrepancies between opCtx's notion of time and what Date_t returns?

      Moreover, in interruptible.h, there exists a runWithDeadline method that takes a Date_t but not an equivalent method in terms of function that can take a time parameter (such as milliseconds) that indicates how long to run for. Perhaps adding that method should be taken into consideration?

              Assignee:
              Unassigned
              Reporter:
              Adithi Raghavan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: