[SERVER-43078] Make MONGO_INITIALIZER functions throw on error Created: 29/Aug/19  Updated: 08/Dec/20  Resolved: 14/Sep/20

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

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Duplicate Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-47778 have MONGO_INITIALIZERs throw to indi... Closed
Sprint: Service arch 2020-09-21
Participants:

 Description   

These functions rarely return anything but Status::OK(), and many are even no-ops, which makes the requirement to return Status::OK() just unnecessary noise.

Moreover, returning anything but Status::OK is essentially fatal, so it might as well throw.
All initializers can be converted very easily.



 Comments   
Comment by Githook User [ 08/Dec/20 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-43078 exceptionize MONGO_INITIALIZER callers
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/bf2a6c0ea2e35e8e776a469db03b89e03f20b5a0

Comment by Billy Donahue [ 13/Aug/20 ]

PoC: https://mongodbcr.appspot.com/479340001/

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