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

Create temporary swappable promise construct in order to receive messages on the RecipientStateMachine

    • Sharding

      Current rough draft implementation:

      • Define different message types, each with their own IDL struct.
      • Thread all message types to a single swappable ShardPromise of type std::variant<All, Message, Types>
      • Use a single mutex to ensure concurrency when emplacing onto or replacing the promise.
      • Under mutex, producer threads will: emplace a promise.
      • Under mutex, the consumer thread will: pick up the message from the promise, then swap out for a new promise.

      This will get us roughly a producer-consumer queue or mailbox of size one.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            blake.oler@mongodb.com Blake Oler
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: