[v8.0] Set correct OpTime for dropRole and dropAllRolesFromDatabase commands

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • ALL
    • Server Security 2025-06-06, Server Security 2025-06-20, Server Security 2025-07-04
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 0

      The dropRole and dropAllRolesFromDatabase commands use a transaction internally to perform atomic updates to the system.users and system.roles collections. In doing so, they also use a different Client instance to perform the transaction, from the Client used to execute the command. The issue with this is that after the transaction commits, the code fails to advance the last OpTime of the actual Client to be at the same time as the internal Client. This can potentially cause the command to use the incorrect OpTime when waiting for write concern.

            Assignee:
            Erwin Pe
            Reporter:
            Erwin Pe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: