-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.2.4, 4.0.17
-
Component/s: Sharding
-
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.
- depends on
-
SERVER-47170 Make the NSTargeter not mix exceptions and statuses for error handling
- Closed
- is depended on by
-
SERVER-46703 Make a variant of checkShardVersionOrThrow which doesn't treat UNKNOWN shard version as UNSHARDED
- Closed
- related to
-
SERVER-47210 The StaleShardVersion error response for {ordered:false} writes contains a lot of repeated information
- Backlog