-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
-
Fully Compatible
-
ALL
-
v8.3
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
During bulk write command size estimation, getOpSizeEstimate() incorrectly uses a statically initialized shardId (see https://github.com/10gen/mongo/blob/71079c6503698ac78f0e67adeaa08443bb3c7f35/src/mongo/s/write_ops/write_op_helper.cpp#L130).
The implication is that the nss used for estimation is only initialized once, with the first bulk write command that is run on mongos. Any subsequent command will have use the same shardId for the estimation, which can lead to the estimation being incorrect.
This isn't a problem in production, because the nss is only embedded into the shardVersion when TestingProctor is enabled (see https://github.com/10gen/mongo/blob/d5b6fe52828eedfdfaa5519de1a1d8c304aa2ff3/src/mongo/db/versioning_protocol/shard_version_factory.cpp#L64).
As part of this ticket, remove the use of static for the mock shardId.
- related to
-
SERVER-123344 Fix long namespace error in timeseries_2dsphere_index_version_matcher_consistency.js
-
- Closed
-