Description:
Hi,
in [1], I present a metric for tuning parallel replication: the "Average Modified Interval Length". For computing this metric, the binary logs needs to be parsed, which is a hurdle. This feature request is about exposing some global statuses for easing computing this metric (only looking at MySQL).
[1]: http://jfg-mysql.blogspot.com/2017/02/metric-for-tuning-parallel-replication-mysql-5-7.htm...
The Average Modified Interval Length" needs the following global statues to be computed:
-BINLOG_COMMIT: counts the number of transactions written to the binary logs,
-BINLOG_INTERVAL_LENGTH_MODIFIED_MYSQL_5_7_19: accumulates (sums) the "modified" interval length (I am using MYSQL_5_7_19 as a suffix for this metric because the MTS applier might be changed and a new "modified" counter might be needed as we need to be able to expose the metric for a MySQL 5.7.19 slave and for other future versions or MySQL, including 5.7.x and 8.x.y).
More details in [1] above.
In addition to the global statuses above, the global statuses below could also be implemented for completeness:
-BINLOG_INTERVAL_LENGTH: accumulates (sums) the unmodified interval length,
-BINLOG_INTERVAL_LENGTH_SQUARE: accumulates (sums) the square of the unmodified interval length (for computing a standard deviation),
-BINLOG_INTERVAL_LENGTH_MODIFIED_MYSQL_5_7_19_SQUARE: would accumulate (sum) the square of the "modified" interval length.
Many thanks,
JFG
How to repeat:
Not a bug but a feature request.
Suggested fix:
Implement new global statuses.