[SERVER-47437] Unify NetworkInterfaceTL state allocations Created: 09/Apr/20  Updated: 29/Oct/23  Resolved: 18/May/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.0-rc7, 4.7.0

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

Issue Links:
Backports
Depends
Related
is related to SERVER-46617 Improve NetworkInterfaceTL performance Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Service arch 2020-04-20, Service arch 2020-05-04, Service arch 2020-05-18, Service arch 2020-06-01
Participants:
Linked BF Score: 78

 Description   

We currently do a collection of independent heap allocations when making command state and free them piecemeal. We can allocate once and free once with smarter pointer logic.



 Comments   
Comment by Benjamin Caimano (Inactive) [ 18/May/20 ]

Alright, this has landed on both master and v4.4. The commit message explains a bit about what this ticket does functionally. Notably, there were some connection management synchronization issues that should be fixed by this ticket. Semantically, we now have stronger expectations for exactly how long each bit of asynchronous state lives in our network interface. The state for commands themselves might live a bit longer and extend the lifetime of a bunch of constituent pieces. The state for individual requests lives for only as long as we expect a response. Both of these should make our networking resource usage more predictable.

Comment by Githook User [ 18/May/20 ]

Author:

{'name': 'Ben Caimano', 'email': 'ben.caimano@10gen.com'}

Message: SERVER-47437 Synchronize and unify NetworkInterfaceTL state components

This patch does the following:

  • Fixes a use-after-move scenario with operationKey.
  • Alters the cancelation pattern to kill remotely first, then locally.
  • Initializes the requestManager and timer members in the
    CommandState*::make() function.
  • Uses the existing mutex to synchronize connection resolution and
    cancelation.
  • Attempts to bind std::shared_ptr<RequestState> only to the request
    path.
    Branch: v4.4
    https://github.com/mongodb/mongo/commit/42c6939a2e22c6aac7c5ac445bab3dcd81617072
Comment by Githook User [ 18/May/20 ]

Author:

{'name': 'Ben Caimano', 'email': 'ben.caimano@10gen.com'}

Message: SERVER-47437 Synchronize and unify NetworkInterfaceTL state components

This patch does the following:

  • Fixes a use-after-move scenario with operationKey.
  • Alters the cancelation pattern to kill remotely first, then locally.
  • Initializes the requestManager and timer members in the
    CommandState*::make() function.
  • Uses the existing mutex to synchronize connection resolution and
    cancelation.
  • Attempts to bind std::shared_ptr<RequestState> only to the request
    path.
    Branch: master
    https://github.com/mongodb/mongo/commit/9395bf07b2c2e6a3204d10543f7d731754bd7c9d
Generated at Thu Feb 08 05:14:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.