[SERVER-42508] Convert SessionsCollection to throw instead of return status Created: 30/Jul/19  Updated: 29/Oct/23  Resolved: 30/Oct/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Improvement Priority: Major - P3
Reporter: Benjamin Caimano (Inactive) Assignee: Marcos José Grillo Ramirez
Resolution: Fixed Votes: 1
Labels: neweng-kal
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes SERVER-47477 Sharded logical sessions cache refres... Closed
causes SERVER-73229 Logical sessions cache refresh ignore... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2019-10-21, Sharding 2019-11-04
Participants:

 Description   

All of the SessionsCollection functions return a Status. Nearly every spot in which its functions are used either uassertStatusOK() or return immediately on !Status::isOK(). We should just throw.



 Comments   
Comment by Githook User [ 31/Oct/19 ]

Author:

{'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-42508 Get rid of some additional unused code in SessionsCollection

... and also improve comments.
Branch: master
https://github.com/mongodb/mongo/commit/1f94484d52064e12baedc7b586a8238d63560baf

Comment by Githook User [ 30/Oct/19 ]

Author:

{'email': 'marcos.grillo@10gen.com', 'name': 'Marcos José Grillo Ramírez'}

Message: SERVER-42508 Convert SessionsCollection to throw instead of return status

Change the remaining public functions: refreshSessions, removeRecords and findRemovedSessions
Branch: master
https://github.com/mongodb/mongo/commit/46ab40ac2c604c2fb09488856cadbb751df2572f

Comment by Githook User [ 29/Oct/19 ]

Author:

{'name': 'Marcos José Grillo Ramírez', 'email': 'marcos.grillo@10gen.com'}

Message: SERVER-42508 Convert SessionsCollection to throw instead of return status

Change the return value of checkSessionsCollectionExists from Status to void and throws exception on error
Branch: master
https://github.com/mongodb/mongo/commit/81f52a69c92d27034ef3a9bf411fb463cab7643e

Comment by Githook User [ 24/Oct/19 ]

Author:

{'name': 'Marcos José Grillo Ramírez', 'email': 'marcos.grillo@10gen.com'}

Message: SERVER-42508 Convert SessionsCollection to throw instead of return status Part One: setupSessionsCollection
Branch: master
https://github.com/mongodb/mongo/commit/4003ef1b40e4404fc42d8a13db7e3a12946e0832

Comment by Benjamin Caimano (Inactive) [ 30/Jul/19 ]

I don't expect this to be a priority, but the next time work needs to be done on SessionsCollection, this can only make things easier. We're passing Status for something like 5 functions.

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