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

Support socket disconnect kills for getMore

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-query Backlog - Query Team
            Reporter:
            jason.carey Jason Carey
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated: