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

The MongoS write commands scheduler does not account for the potential size of the response BSON

    • Fully Compatible
    • ALL
    • Sharding 2020-03-23, Sharding 2020-04-06, Sharding 2020-04-20

      When constructing the batch insert/update/delete command to send to shards, the MongoS write commands scheduler (aka BatchWriteExecutor), accounts for the size of the outgoing request, so it doesn't exceed the 16MB BSON size limit on the way out. However, this doesn't guarantee that the response, which gets generated by the shard will not exceed that size.

      This is usually not problematic for ordered=true batches or for smallerĀ ordered=false batches. However for larger ordered=false batches, because of the way the writeErrors is generated, the response can grow to be much larger than the request.

      As an example, a batch insert of 100.000 entries which encounters a StaleShardVersion, will result in this kind of situation.

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: