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.