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

Optimize TicketHolder::waitForTicketUntil()

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Concurrency
    • Labels:
      None
    • Fully Compatible
    • Query 2020-03-09, Query 2020-03-23

      This function blocks on a semaphore until a timeout is reached. In the case that we are not contending with other threads to acquire the semaphore, this function need not read the clock in order to calculate its deadline. Reading the clock can be expensive, so it would be beneficial to avoid this work in the common case.

      This function is worth optimizing, since it's on the hot path for acquiring a global lock, which pretty much all database operations need to do.

            Assignee:
            david.storch@mongodb.com David Storch
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: