[SERVER-58727] Perform local operation when AsyncRequestsSender only targets local shard Created: 21/Jul/21  Updated: 29/Mar/23  Resolved: 07/Sep/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Katherine Wu (Inactive) Assignee: Tommaso Tocci
Resolution: Won't Do Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-58376 Perform local read when $lookup into ... Closed
Related
is related to SERVER-75294 Investigate slowness of sharded $lookup Closed
Participants:

 Description   

Currently the AsyncRequestsSender does not differentiate between a remote or local target shard. If it can determine that there is only one target shard and that we are currently on that target shard, instead of establishing a remote cursor and using network traffic it could instead perform the operation locally.



 Comments   
Comment by Katherine Wu (Inactive) [ 07/Sep/21 ]

tommaso.tocci understood, thanks for the update. I have re-opened SERVER-58376 to address this on the Query side.

Comment by Tommaso Tocci [ 07/Sep/21 ]

katherine.wu after discussing this with max.hirschhorn we realized that implementing such optimization would break other functionalities. In fact bypassing the normal remote shard targeting and remote command execution path would also skip mirroring reads.

So the implementation of this optimization can't be done just a the level of the AsyncRequestSender, but it will probably require a in depth restructuring of the whole command execution path.

Due to the amount of work required by this ticket and the benefit it would deliver we decided not to do it for the moment.

Generated at Thu Feb 08 05:45:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.