[DOCS-14672] Investigate changes in SERVER-57390: Remove the implementation of the getLastError command Created: 22/Jul/21  Updated: 13/Nov/23  Resolved: 23/Sep/22

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 5.1.0-rc0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Dave Cuthbert (Inactive)
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-57390 Remove the implementation of the getL... Closed
Participants:
Days since reply: 2 years, 18 weeks, 2 days ago
Epic Link: DOCSP-14300

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



 Comments   
Comment by Naomi Pentrel (Inactive) [ 04/Oct/21 ]

CR: https://mongodbcr.appspot.com/839810001/

Generated at Thu Feb 08 08:10:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.