-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: 8.2.0-rc0
-
Component/s: None
-
None
-
Catalog and Routing
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The VersionContext type is currently declared in a single header file (src/mongo/db/version_context.h) but the definitions are split between two source files (src/mongo/db/version_context.cpp) and src/mongo/db/version_context_decoration.cpp).
This split is due to the need to use VersionContext from within server_base (where OperationContext is not available), yet still allow implementing methods such as VersionContext::getDecoration(OperationContext*).
An alternative design would be to move the methods that receive an OperationContext parameter to a new VersionContextDecoration class. This would allow a 1-to-1 correspondence between header and source files, potentially preventing confusion and linking problems.
- related to
-
SERVER-99351 Incorporate Operation FCV into the FCVGatedFeatureFlag API
-
- Closed
-