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

Reduce the number of futures in command execution path

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: Internal Code
    • Fully Compatible
    • v5.0
    • Service Arch 2021-04-19, Service Arch 2021-05-17, Service Arch 2021-05-31
    • 0

      Constructing a new future (i.e., an instance of Future, SemiFuture and ExecutorFuture) is not cheap and imposes some cost both at its construction and destruction. Some of this cost is attributed to heap-allocations and known inefficiencies of releasing memory allocated by other threads.

      We can reduce the number of futures constructed in the command execution path, by merging continuations and changing blocking functions to return basic types instead of values wrapped in futures. This transition could help with reducing the latency of command execution.

            Assignee:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Reporter:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: