[SERVER-55800] Reduce the number of futures in command execution path Created: 05/Apr/21  Updated: 29/Oct/23  Resolved: 21/May/21

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 1
Labels: post-rc0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-54804 Investigate performance improvements ... Backlog
is related to SERVER-57137 Make command execution path easier to... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Service Arch 2021-04-19, Service Arch 2021-05-17, Service Arch 2021-05-31
Participants:
Linked BF Score: 0

 Description   

Constructing a new future (i.e., an instance of Future, SemiFuture and ExecutorFuture) is not cheap and imposes some cost both at its construction and destruction. Some of this cost is attributed to heap-allocations and known inefficiencies of releasing memory allocated by other threads.

We can reduce the number of futures constructed in the command execution path, by merging continuations and changing blocking functions to return basic types instead of values wrapped in futures. This transition could help with reducing the latency of command execution.



 Comments   
Comment by Githook User [ 21/May/21 ]

Author:

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

Message: Revert "SERVER-55800 Reduce the number of futures in executeCommand"

This reverts commit fb92ba9cf474f28f6c77b230018a6d30242143dc.
Branch: master
https://github.com/mongodb/mongo/commit/f522af24c8cc07bdb4d2437074e9d8b3e01a880e

Comment by Githook User [ 19/May/21 ]

Author:

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

Message: SERVER-55800 Reduce the number of futures in executeCommand
Branch: master
https://github.com/mongodb/mongo/commit/fb92ba9cf474f28f6c77b230018a6d30242143dc

Comment by Githook User [ 22/Apr/21 ]

Author:

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

Message: SERVER-55800 Reduce the number of futures in handleRequest
Branch: master
https://github.com/mongodb/mongo/commit/8a5e39208e621c28985d37d2655bf9d87bf23f92

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