[DRIVERS-360] Could the server remove support for getLastError? Created: 15/Mar/17  Updated: 17/Mar/20  Resolved: 08/Jan/18

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Andy Schwerin Assignee: Grigori Melnik (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-28318 make sharded getLastError work with p... Closed
Related
related to SERVER-10637 Provide a mechanism to expose the con... Closed

 Description   

Continuing to support getLastError, especially in mongos, is a minor ongoing nuisance. See, e.g., SERVER-28318. Could the server reasonably deprecate it in 3.6 and remove it in 3.8? What about just remove it in 3.6?



 Comments   
Comment by Jeffrey Yemin [ 05/Jan/18 ]

Linking to SERVER-10637, which requests that isMaster includes the connectionId.

Comment by Bernie Hackett [ 15/Mar/17 ]

Another thing to consider, though this isn't a deal breaker - just something we would likely have to document, applications that use old drivers written for server versions previous to 2.6 will break.

Comment by Bernie Hackett [ 15/Mar/17 ]

This would also seem to be one more nail in the coffin for unacknowledged writes.

Comment by Bernie Hackett [ 15/Mar/17 ]

Helpers aren't a big problem since we can document them as deprecated and document what server versions they support (or, alternatively, what server version removed support). It's automatic internal use in drivers I'm worried about.

Comment by A. Jesse Jiryu Davis [ 15/Mar/17 ]

Just removing it in 3.6 seems ok. PyMongo has a deprecated helper called "error" that's been deprecated for years, and not even useful, given how connection pooling works in PyMongo. The C Driver has no helper. Neither driver uses getLastError internally with MongoDB 2.6+.

Comment by Bernie Hackett [ 15/Mar/17 ]

Assuming drivers can drop support for MongoDB 2.4 in the releases that support 3.6, I think the answer is yes. We'll have to do some research to ensure no driver is using getLastError for anything other than inserts, updates, and deletes.

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