-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
We have many occurrences in the code where we try to determine the class affiliation (a.k.a., isInstanceOf ) of a pointer to a DocumentSource, and there are at least 3 ways to do that:
- dynamic cast the pointer to the target type and check if it fails (at least 36 times in master)
- compare pointer->getSourceName() with a string constant (at least 18 times in master)
- compare pointer->getId() (introduced by
SERVER-99019) with an integer constant (at least 2 times in master)
It would be nice if we had some consistency. Out of 3 methods, the string comparison seems least efficient.
- related to
-
SERVER-99019 Modularize DocumentSourceType
-
- Closed
-