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

make sharded getLastError work with paths that go over ASIO, or eliminate it

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.6
    • Affects Version/s: 3.5.4
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2017-04-17

      As we replace uses of DBClient with tasks scheduled over the TaskExecutor/ASIO, any paths on mongos that used DBClient to save the lastError info through the ShardingEgressMetadataHook will no longer function.

      This is because the hook checks haveClient(), and the ASIO threads do not have Clients. (The original thread that scheduled tasks on behalf of a request to mongos had the Client).

      It is not easy to pass the Client for the original thread to the hook, since the Client is obtained from the OperationContext, and it is unsafe to use the OperationContext from a multi-threaded context.

      This may possibly be addressed by work done in the near future on using the OperationContext from tasks on the TaskExecutor by schwerin and redbeard0531.

            Assignee:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: