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

Support socket disconnect kills for getMore

    • Query Execution
    • Fully Compatible

      As part of the socket disconnect project, a new facility (OperationContext::markKillOnClientDisconnect) was introduced which, when invoked, makes the operation treat socket disconnect as a kill thereafter.

      The litmus test for whether to flag an opctx this way is supposed to be whether the underlying operation is idempotent. I.e. if someone from the outside could have detected if it suceeded or failed if they had connected, started running their command, saw it in currentop, then killed the socket (and gotten full value from the command).

      For most cursors, this is a no brainer, if you die while reading a batch, we usually close the cursor. There's some complexity around detecting whether a cursor is secretely a $out agg cursor that was initiated with batchSize 0 however. In that case, we'd like to avoid applying the flag.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: