Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97297

Multi updates with upsert:true can fail due to StaleConfig even with pauseMigrationsDuringMultiUpdates set

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • Fully Compatible
    • ALL
    • Cluster Scalability Priorities
    • 200

      SERVER-90157 made it so that multi updates with upsert:true do not need to go through the MultiUpdateCoordinator. This was done to fix a deadlock between a multi update with upsert:true and the MultiUpdateCoordinator when trying to acquire a DDL lock for implicit collection creation. However, this fix also inadvertently introduced a new issue where multi updates with upsert:true can fail with StaleConfig (see Joan's comment here for how this is possible). 

      The following are two possible solutions:

      • Revert SERVER-90157 and make the collection creation work with the MultiUpdateCoordinator. This could potentially be done by having the MultiUpdateCoordinator create the collection if it doesn't exist before running the update. 
      • If we don't want to invest a lot of time into this, and don't think this is a big issue, we could also throw an error when a multi update with upsert:true implicitly creates a collection. 

            Assignee:
            wenqin.ye@mongodb.com Wenqin Ye
            Reporter:
            wenqin.ye@mongodb.com Wenqin Ye
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: