[SERVER-18131] Make LastError data part of Client, not thread-local Created: 20/Apr/15  Updated: 25/Jan/17  Resolved: 29/Apr/15

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 3.1.3

Type: Task Priority: Major - P3
Reporter: Andy Schwerin Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-19924 getLastError's n value now indicates ... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

The LastError object on a thread stores information about the last getLastError-compatible operation on the current thread. All other such information is stored in objects hanging off of the Client itself, and LastError should be no different.



 Comments   
Comment by Githook User [ 29/Apr/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-18131 Clean up LastError.

Makes LastError a decoration on Client. Removes behavior that was specific to
the dbKillCursors wire protocol message into the processing for that message,
and out of last error. Simplifies lifetime of LastError. It always exists on
Clients, so there's no checking for its existence, and no passing it around
through parts of the networking library.
Branch: master
https://github.com/mongodb/mongo/commit/da31be34dc6664d76868543e9ccdaecad4f504c6

Comment by Githook User [ 23/Apr/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: Revert "SERVER-18131 Clean up LastError."

This reverts commit 54c25da33ec7270295c8948f6a51376ec4fd278c and
commit c952a9396a1843aa45d6afa3c6785dec607de112.
Branch: master
https://github.com/mongodb/mongo/commit/ab8295bf7cc572a391e8c364b5291f1d9b3b0720

Comment by Githook User [ 23/Apr/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-18131 Add missing include; fix Windows compile.
Branch: master
https://github.com/mongodb/mongo/commit/54c25da33ec7270295c8948f6a51376ec4fd278c

Comment by Githook User [ 23/Apr/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-18131 Clean up LastError.

Makes LastError a decoration on Client. Removes behavior that was specific to
the dbKillCursors wire protocol message into the processing for that message,
and out of last error. Simplifies lifetime of LastError. It always exists on
Clients, so there's no checking for its existence, and no passing it around
through parts of the networking library.
Branch: master
https://github.com/mongodb/mongo/commit/c952a9396a1843aa45d6afa3c6785dec607de112

Comment by Githook User [ 20/Apr/15 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-18131 Retire some unused parts of LastError.
Branch: master
https://github.com/mongodb/mongo/commit/033ebdf3326916fda46cd3eb39fb7402cc59bd2b

Comment by Andy Schwerin [ 20/Apr/15 ]

It should and will live past the operation context. The client lasts through many operations. It is the representation of an ordered sequence of commands or operations, which is the concept to which I believe last-error ought to be bound.

Comment by Scott Hernandez (Inactive) [ 20/Apr/15 ]

Isn't there a problem with this as the LastError should last past the operation context and client so it can live past the user request until GLE is called to return it? Or is the final death throw of GLE?

Generated at Thu Feb 08 03:46:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.