Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-85857

Avoid closing the connections with ARS destruction by waiting for all responses

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Cluster Scalability 2024-2-5
    • 2

      SERVER-80838 made it so that any pending child writes of parent writes of type WWSKWID are canceled (by breaking out of the ARS execution loop) with ErrorCodes::CallBackCanceled as per the default behavior of mongo RPC. This causes the connections to those shards to be closed in the ConnectionPool dropping the number of active connections. When a new request comes in to connect to those shards, more CPU time is spent establishing SSL/TLS connection impacting performance during higher write rates.

      One approach is to cancel the requests out of band by sending a killOps and cancel any pending write operation at mongod - but even that takes a network RTT to complete. It would be better to wait for the pending shards' responses and discard them without processing. We would still be faster the majority of the time when shards are co-located in the same zone. In the cases where the shards are in other zones that take a longer time to respond, we wouldn't be performing any worse than what it was earlier.

            Assignee:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Reporter:
            abdul.qadeer@mongodb.com Abdul Qadeer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: