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

Clean up duplicate setPromiseFromStatusIfNotReady functions

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Service Arch

      tenant_migration_donor_service.cpp and tenant_migration_recipient_service.cpp define overlapping sets of functions (with different capitalization of "if"):

      • setPromiseOkIfNotReady
      • setPromiseFromStatusIfNotReady
      • setPromiseErrorIfNotReady

      It's controversial whether we should test-and-set Promises like this at all. Let's clean up this mess. Don't factor them into future.h or future_util.h, because that would only encourage more usage of these functions, which are considered an anti-pattern. Put them in a tenant migration utility file, or eliminate their use entirely. The latter would be a project.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: