|
I do not think that the interface to monitor counters is intended to work in this way. Counters are supposed to be enabled by assigning something to innodb_monitor_enable and disabled by assigning to innodb_monitor_disable. Based on recent experience with MDEV-30567, I would expect that checking if a counter is enabled is expensive, possibly more expensive than updating the counter in the first place. We should consider enabling all counters all the time, and preferring counters that are covered by pre-existing mutexes or rw-locks. In fact, we should probably introduce status variables for every counter that makes some sense, and then deprecate and remove this interface (MDEV-15706).
|