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.
- depends on
-
SERVER-28591 rename ShardingTaskExecutor to ShardTaskExecutor
- Closed
-
DRIVERS-360 Could the server remove support for getLastError?
- Closed