Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14672

Investigate changes in SERVER-57390: Remove the implementation of the getLastError command

    XMLWordPrintableJSON

Details

    Description

      Downstream Change Summary

      getLastError command implementation is removed all together from both mongod and mongos and will be returned with errorcode = 573900 on mongod and 5739001 on mongos.

      Description of Linked Ticket

      The command should unconditionally uassert(). Perhaps it should raise an error with code 115, CommandNotSupported?

      We should make sure that we continue to count attempted uses of the getLastError command in db.serverStatus().metrics.commands.getLastError, and continue to log warning 5578800. The warning looks something like this:

      {"t":{"$date":"2021-06-03T10:57:17.903-04:00"},"s":"W",  "c":"COMMAND",  "id":5578800, "ctx":"conn1","msg":"Deprecated operation requested","attr":{"op":"getLastError","clientInfo":{"application":{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"5.0.0-alpha0"},"os":{"type":"Linux","name":"Ubuntu","architecture":"x86_64","version":"18.04"}}}}
      

      Attachments

        Activity

          People

            dave.cuthbert@mongodb.com Dave Cuthbert (Inactive)
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              2 years, 18 weeks, 2 days ago