[SERVER-73611] Implement RPC functionality of PinnedConnectionTaskExecutor Created: 03/Feb/23  Updated: 29/Oct/23  Resolved: 27/Mar/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.0.0-rc0, 6.0.6

Type: Task Priority: Major - P3
Reporter: George Wangensteen Assignee: George Wangensteen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-73609 Let PinnedConnectionTaskExecutor acqu... Closed
is depended on by SERVER-73612 Add makePinnedConnectionTaskExecutor ... Closed
Duplicate
is duplicated by SERVER-73609 Let PinnedConnectionTaskExecutor acqu... Closed
is duplicated by SERVER-73612 Add makePinnedConnectionTaskExecutor ... Closed
Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Backport Requested:
v6.3
Sprint: Service Arch 2023-03-20, Service Arch 2023-04-03
Participants:

 Description   

Implement scheduleRemoteCommand and related RPC functionality of PinnedConnectionTaskExecutor. This should involve: 

  • Acquiring a connection from the networkInterface if this is the first RPC run through this PinnedConnectionTaskExecutor, and storing it
  • Enqueing the RPC request on a queue 
  • If no RPC work is currently being done, use the acquired connection to kick off asynchronous networking for the first RPC, using the reactor associated with the connection

Ensuring that the asynchronous networking on the reactor will continue processing each queued RPC request in a FIFO order unitl no requests are queued

Additionally, we'll need to handle cancellation for these RPC operations. This will involve: 
    -> Producing a CallbackState associated with each RPC operation request, and with a CallbackHandle returned to the user who scheduled the request
-> Allowing that CallbackHandle's "cancel" functionality to prevent that RPC from ever being run, if it has not yet started, or to cancel the ongoing asynchronous operation if it has. This may require mutex acquisition so we need to think carefully about what the concurrency - control should be here, and if and how the underlying connection can be reused after cancellation.

 

At implementation time, we may find it wortwhile to break the cancellation off into a separate task.



 Comments   
Comment by Githook User [ 14/Apr/23 ]

Author:

{'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com', 'username': 'gewa24'}

Message: SERVER-73611 Add a PinnedConnectionTaskExecutor. This commit adds a TaskExecutor capable of using a single transport connection for all RPCs scheduled through it. It is a combination of the commits 6c8f28e5f780b6b7c84e15207be05ce74dfe9d53, 13c9e75f19c6f21e90c250b3ff8ddf3d3cbad192, and f0faf5547f917c2b69959a9c4771b67719d8dbee
Branch: v6.0
https://github.com/mongodb/mongo/commit/df99985ae111b556ffe6c60c12714232b1b3b652

Comment by Githook User [ 26/Mar/23 ]

Author:

{'name': 'George Wangensteen', 'email': 'george.wangensteen@mongodb.com', 'username': 'gewa24'}

Message: SERVER-73611 Add RPC functionality to PinnedConnectionTaskExecutor
Branch: master
https://github.com/mongodb/mongo/commit/13c9e75f19c6f21e90c250b3ff8ddf3d3cbad192

Generated at Thu Feb 08 06:25:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.