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

Bulk write operation might fail with NamespaceNotFound

    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v7.0, v6.0, v5.0, v4.4
      1. Apply the patch attached in commit version eab80c5be
    • CAR Team 2023-12-11, CAR Team 2023-12-25
    • 1

      When a write is targeted, we try to ensure the target database is created by using the cluster DDL API. However, this API only tries once, so the following scenario is totally plausible:

      1. A write arrives to a router, it uses cluster::createDatabase to create the new database
      2. A drop database arrives to the same router, and manages to commit before the collection refresh in the insert path
      3. The insert fails with NamespaceNotFound

      We should retry the database creation until it succeeds in the targetter.

            antonio.fuschetto@mongodb.com Antonio Fuschetto
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            0 Vote for this issue
            5 Start watching this issue