-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
There are two potential downstream concerns from the implementation of this project.
1. This project adds a cluster parameter called "pauseMigrationsDuringMultiUpdates". This parameter will mark updateMany and deleteMany as migration blocking operations while enabled.
2. This project adds the cluster parameter document representing "pauseMigrationsDuringMultiUpdates" to the output of serverStatus.
Description of Linked Ticket
Summary
A customer can opt-in to pausing balancing in a sharded cluster when updateMany operations are received by the database to ensure that the updateMany operations are successfully executed and all of the applicable documents are updated in a consistent manner.
Motivation
Today when a client application sends an updateMany operation to a sharded cluster it is not serialized with chunk migrations so there's a possibility that the updateMany operation will target documents in a migrating chunk which can lead to an inconsistent updates. The updateMany operation on a document with the balancer active could potentially happen 0, 1, 2 or more times. This inconsistent behavior is not returned or exposed to the client application so the application believes that the updateMany operation successfully occurred and ultimately leads to a loss of data integrity. Additionally by pausing the balancer an updateMany query does not require the shard key in the case where upsert:true