[SERVER-49107] Add async command API Created: 25/Jun/20  Updated: 29/Oct/23  Resolved: 06/Nov/20

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

Type: New Feature Priority: Major - P3
Reporter: Benjamin Caimano (Inactive) Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-46653 Guard return path from ServiceEntryPo... Open
is depended on by SERVER-49108 Convert buildInfo command to async im... Closed
Gantt Dependency
has to be done after SERVER-50346 Simplify exception handling in Servic... Closed
Problem/Incident
causes SERVER-52714 Fix the lifetime of ImpersonationSess... Closed
Related
is related to SERVER-52663 Fix the lifetime of ScopedMetricsColl... Closed
Backwards Compatibility: Fully Compatible
Sprint: Service arch 2020-07-13, Service Arch 2020-07-27, Service Arch 2020-08-10, Service Arch 2020-08-24, Service arch 2020-09-07, Service arch 2020-10-05, Service arch 2020-11-02, Service arch 2020-11-16
Participants:
Linked BF Score: 0

 Description   

For certain Command implementations, notably awaitable isMaster, there is the potential to join an asynchronous queue. We should add some new functions to the Command* API. To allow for asynchronous functions to activate hooks, we need a new helper ala CommandHelpers::runCommand() and a new version of CommandInvocation::run(). The async CommandInvocation::run() should default to running the sync implementation on some persistent executor. There is some real work here in terms of designing a reliable API.

This ticket also involves attaching this API to the command path.



 Comments   
Comment by Githook User [ 03/Dec/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-49107 Allow binding clients to executor threads
Branch: master
https://github.com/mongodb/mongo/commit/215c7b76ddb273627414edce75bea35acd1c0edd

Comment by Githook User [ 06/Nov/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-49107 Add support for async execution to MongoD command path
Branch: master
https://github.com/mongodb/mongo/commit/a0fce10bb34cb04455f02948352f5eb37b38ad75

Comment by Githook User [ 20/Oct/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-49107 Futurize migrationConflictHandler and runCommandInvocation
Branch: fixed_thread_pool_handshaking
https://github.com/mongodb/mongo/commit/18f1d000290ef77758455bbbe9c5de174614c3e7

Comment by Githook User [ 14/Oct/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-49107 Futurize and refactor command invocation
Branch: fixed_thread_pool_handshaking
https://github.com/mongodb/mongo/commit/b03c93d55baefc8a70a6ee790f1d497fd1ff8b70

Comment by Githook User [ 14/Oct/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-49107 Futurize and refactor runCommandImpl()
Branch: fixed_thread_pool_handshaking
https://github.com/mongodb/mongo/commit/1d6af89487957dfa75835b60f4c09e8c3cdf5cd5

Comment by Githook User [ 26/Sep/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-49107 Futurize and refactor execCommandDatabase()
Branch: fixed_thread_pool_handshaking
https://github.com/mongodb/mongo/commit/38f350478add12941539ec6f44034d5ba4443265

Comment by Githook User [ 25/Sep/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-49107 Futurize and refactor receivedCommands()
Branch: fixed_thread_pool_handshaking
https://github.com/mongodb/mongo/commit/4c283d5c34ba9a9ba2ede5fa066dcdd9ab337651

Comment by Githook User [ 18/Sep/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-49107 Add support for async execution to handleRequest

This patch extends handleRequest to capture context for out-of-line
execution and makes ServiceStateMachine own the opCtx used for
command execution.
Branch: fixed_thread_pool_handshaking
https://github.com/mongodb/mongo/commit/66b412e1658a3db4935385147b0048a37b39193e

Comment by Githook User [ 14/Sep/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-49107 Allow binding clients to executor threads
Branch: fixed_thread_pool_handshaking
https://github.com/mongodb/mongo/commit/dabf0e0842dcedad2485cc19e65db262bb3172f6

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