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

random_DDL_CRUD_operations.js may attempt to rename to a same destination ns twice

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.4, 5.1.0-rc0
    • Affects Version/s: 5.1.0
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • v5.0
    • Sharding EMEA 2021-06-28
    • 21

      random_DDL_CRUD_operations.js runs renameCollection with

      {dropTarget: false}

      . Thus, the destination ns must not exist, else it will fail with NamespaceExists error.

      random_DDL_CRUD_operations.js attempts to ensure that won't happen by picking 'unique' destination names. It does so by appending a timestamp to the collection name. However, if done twice in the same second, the test could generate the same destination ns twice.

      This could be addressed by appending a randomly generated UUID instead of a timestamp.

            Assignee:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Reporter:
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: