Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-8339

Investigate changes in SERVER-90893: listDatabases inconsistent with concurrent DDL operations

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Developer Tools
    • Not Needed

      Original Downstream Change Summary

      As of SERVER-90893, listDatabases may return results in non-sorted order. The listDatabases documentation page does not state that the output is sorted, and its sample output is unsorted. That being said, the implementation provided incidentally sorted output until SERVER-90893, which introduced a rare case where the bottom entries may not be sorted. This downstream notification is to ensure that our internal usages do not rely on any implicit ordering of the output.

      Description of Linked Ticket

      Internal testing has hit a bug where an initial sync missed copying a collection because listDatabases failed to include the associated database. The collection and the database were created in the same transaction just before listDatabases for the initial sync, so there is a degree of concurrency involved here. We missed this collection because the collection creation also implicitly created the containing database. After committing the associated transaction but before updating the local catalog, the listDatabases command doesn't list the database.

      Note: We fixed a similar issue in SERVER-82221 for listCollection.

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

              Created:
              Updated:
              Resolved: