[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: |
|
||||||||||||
| 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: ... and also improve comments. |
| Comment by Githook User [ 30/Oct/19 ] |
|
Author: {'email': 'marcos.grillo@10gen.com', 'name': 'Marcos José Grillo Ramírez'}Message: Change the remaining public functions: refreshSessions, removeRecords and findRemovedSessions |
| Comment by Githook User [ 29/Oct/19 ] |
|
Author: {'name': 'Marcos José Grillo Ramírez', 'email': 'marcos.grillo@10gen.com'}Message: Change the return value of checkSessionsCollectionExists from Status to void and throws exception on error |
| Comment by Githook User [ 24/Oct/19 ] |
|
Author: {'name': 'Marcos José Grillo Ramírez', 'email': 'marcos.grillo@10gen.com'}Message: |
| 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. |