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

Include arrayFilters when estimating size of update command object on mongoS

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.2
    • Affects Version/s: None
    • Component/s: Sharding, Write Ops
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Query 2018-07-30, Query 2018-08-13
    • 73

      In the mongoS write path here, we estimate the size of the update command that will be forwarded to the shards as follows:

      auto estSize = item.getUpdate().getQ().objsize() + item.getUpdate().getU().objsize() +
             collationSize + kEstUpdateOverheadBytes;
      

      We also dassert that estSize is greater than or equal to the size of the complete update command when the latter has been serialized to BSON. However, we don't include the size of the arrayFilters field in estSize, which means that debug builds with a large arrayFilters vector will terminate after failing this check.

            Assignee:
            bernard.gorman@mongodb.com Bernard Gorman
            Reporter:
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: