Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3431

Investigate changes in PM-3209: Block balancing during updateMany

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Original Downstream Change Summary

      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

      Epic Summary

      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

      Documentation

      Product Description
      Scope
      Technical Design
      Docs Update

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: