[MDEV-32553] "innodb_monitor_disable = default" does not reset all monitors "enable" stataus to default Created: 2023-10-23  Updated: 2023-10-23

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.4, 10.5, 10.6, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Vladislav Lesin Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-32554 mon_lock_wait_current_count test caus... Closed

 Description   

SET GLOBAL innodb_monitor_disable = default;

Does not restore all metrics enabling to default values.
The following test shows differences:

--source include/have_innodb.inc                                                
--source include/have_debug.inc                                                 
                                                                                
SET GLOBAL innodb_monitor_disable = default;                                    
--eval select name, enabled from information_schema.innodb_metrics into outfile '$MYSQL_TMP_DIR/out-1'
                                                                                
SET GLOBAL innodb_monitor_disable=all;                                          
SET GLOBAL innodb_monitor_disable = default;                                    
                                                                                
--eval select name, enabled from information_schema.innodb_metrics into outfile '$MYSQL_TMP_DIR/out-2'
                                                                                
--exec diff -u $MYSQL_TMP_DIR/out-1 $MYSQL_TMP_DIR/out-2                        
                                                                                
--remove-file $MYSQL_TMP_DIR/out-1                                              
--remove-file $MYSQL_TMP_DIR/out-2 



 Comments   
Comment by Marko Mäkelä [ 2023-10-23 ]

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).

Generated at Thu Feb 08 10:32:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.