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

mongoS doesn't set batch size (and keeps the old one, 0) on getMore if performed on first _cursor->more()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.6.10, 3.0.3, 3.1.4
    • Fix Version/s: 2.6.11, 3.0.5, 3.1.6
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Completed:
    • Sprint:
      Sharding 6 07/17/15
    • Case:

      Description

      mongos in cursors.cpp only sets batch size (and always sets batch size) after a document is returned. This leads to the batch size being set to 0 every time a full load of ntoreturn documents are sent back to the client. If the cursor is exhausted at that point, then the next getMore request to the mongoD (which will be sent on the next will request to the mongoS) will have a batch size of 0. This returns all results and can lead to cursors timing out.

      Moving the setBatchSize before the loop starts and after all breaks (so no useless work is performed setting an invalid batch size on break) should fix this.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: