[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: |
|
||||||||||||||||
| 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 " This reverts commit fb92ba9cf474f28f6c77b230018a6d30242143dc. |
| Comment by Githook User [ 19/May/21 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |
| Comment by Githook User [ 22/Apr/21 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}Message: |