Priority: Major - P3
Affects Version/s: None
Fix Version/s: None
Component/s: Internal Code
Some initializers emitted by these macros are subtly incorrect.
- MONGO_STARTUP_OPTIONS_POST emits a function with the _Store suffix instead of _Post suffix as documented.
- Every phase has its own closed initializer range, after a Begin$X initializer and before an End$X initializer.
But we seem to have flubbed the MONGO_MODULE_STARTUP_OPTIONS_REGISTER rule, which is defined to occur after EndGeneralStartupOptionRegistration and before EndStartupOptionRegistration, which is two "ends" and not its own well-defined interval. I'm not sure what the implications of this are but it doesn't appear to be intentional.
-#define MONGO_MODULE_STARTUP_OPTIONS_REGISTER(fname) \
- MONGO_INITIALIZER_GENERAL(fname##_Register, \
- ("EndGeneralStartupOptionRegistration"), \
We should emit these macros in a more structurally clear way. There's a lot of boilerplate in src/mongo/util/options_parser/startup_option_init.h that can be reduced.