[SERVER-36244] Include arrayFilters when estimating size of update command object on mongoS Created: 23/Jul/18  Updated: 29/Oct/23  Resolved: 08/Aug/18

Status: Closed
Project: Core Server
Component/s: Sharding, Write Ops
Affects Version/s: None
Fix Version/s: 4.1.2

Type: Bug Priority: Major - P3
Reporter: Bernard Gorman Assignee: Bernard Gorman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2018-07-30, Query 2018-08-13
Participants:
Linked BF Score: 73

 Description   

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.



 Comments   
Comment by Githook User [ 08/Aug/18 ]

Author:

{'username': 'gormanb', 'name': 'Bernard Gorman', 'email': 'bernard.gorman@gmail.com'}

Message: SERVER-36244 Include arrayFilters when estimating size of update command object on mongoS
Branch: master
https://github.com/mongodb/mongo/commit/7dbc5c0b82b0d6454fc50d62ebcbaa11240f5ff0

Generated at Thu Feb 08 04:42:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.