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

Remove the implementation of the getLastError command

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Minor Change
    • Query Execution 2021-07-26

      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"}}}}
      

            Assignee:
            yoonsoo.kim@mongodb.com Yoon Soo Kim
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: