[SERVER-71194] Make async_rpc::sendHedgeCommand kill unused cursors Created: 08/Nov/22  Updated: 12/Dec/22  Resolved: 12/Dec/22

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

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

Issue Links:
Duplicate
duplicates SERVER-71764 Implement cancellation contract for a... Closed
Assigned Teams:
Service Arch
Participants:

 Description   

When async_rpc::sendHedgedCommand receives a response that will be used to satisfy the command, it cancels outstanding network operations. If these cancellations succeed, the NetworkInterface should clean up the underlying commands by sending _killOperations. However, if the network operations we're trying to cancel complete before our cancellation arrives, we need to explicitly send _killOperations to ensure we don't leak any cursors established by the completed operation. 

Let's ensure that async_rpc::sendHedgedCommand always sends _killOperations when there a network operation it initiated that:

  • has started an ongoing operation on a remote node, or opened a cursor on a remote node
  • is not used to produce the response for the command

In such cases, _killOperations will ensure that the network operation that is not used to produce the response cannot leak any state, by cleaning up any remote cursors and ongoing remote operations it may have initiated.  



 Comments   
Comment by George Wangensteen [ 12/Dec/22 ]

This work will be done when we implement the correct cancellation logic for the API in SERVER-71764

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