-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Service Arch 2023-10-02
In researching SERVER-81394 (targeting Boost.Preprocessor usage specifically), I found a very heavy Boost.Preprocessor macro system to implement sophisticated macro system for resharding metrics. I mean it's really an achievement in its own right. However, it immediately occurred to me that this was a workaround.
It was only really necessary because of an IDL generator problem. We must use preprocessor token-stitching to produce the name of a trait of an IDL-generated enum trait kNum##name for the enum name. If we make a very small change to IDL, we can just specialize a trait e.g. idlEnumCount<name> instead, and vastly simplify the resharding metrics registration code I encountered. And we'd unlock other beneficial uses in code for teams that aren't currently in a position to put that much engineering time into a workaround.
And it's a very small and simple change! We don't really use this trait much.
- is related to
-
SERVER-81394 replace `invariant` etc uses of boost/preprocessor
- Closed