-
Type: Task
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
Fully Compatible
-
QE 2023-11-27, QE 2023-12-11
ProfilerFilter::getDefault/setDefault uses a global mutex to protect a shared pointer. C++20 adds support for atomic shared_ptr's but our toolchain v4 compilers do not yet support it. ProfilerFilter is rarely set. It is accessed during a findOne() twice: once in FindCommand::run() and HandleRequest::onSuccess
Ideally, a cheap memory reclamation technology like hazard pointers could be used to protect writes to this shared pointer. But since that does not exist in the code base, an alternative is to use a partitioned reader/writer lock so that all the readers do not have to touch the same cache line for taking the reader/writer lock.