-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Networking & Observability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
In SERVER-106630, we added an additional mutex to ObserableMutexRegistry in order to allow mutexes to be registered independently of collection.
We can provide even better isolation by using a std::list as a queue between add() and _collectStats().
Evaluate whether this is worth doing.
Here's some pseudocode:
mutex _registration;
mutex _collection;
std::list<NewEntry> _new;
some_map_thing<Entry> _entries;
add() {
list<NewEntry> newNode{...};
lock{_registration};
_new.splice(...);
}
collect() {
list<NewEntries> newbies;
{
lock{_registration};
newbies.splice(_new);
}
lock{_collection};
for each newbie in newbies {
add an Entry to _entries corresponding to newbie
}
// now _entries is up to date
// continue with "old" implementation of collect()
}
- is related to
-
SERVER-106630 Create the collector for contention metrics
-
- Closed
-