Sachin Setiya <sachin.setiya@mariadb.com> writes:
I have created a patch for this mdev. but I was thinking for monitoring command 'SHOW PROCESSLIST' in Progress column can we show how much % of the events from Event group Slave has applied so that user can get a better monitoring. If I apply my patch I get only this. MariaDB [d]> show processlist; +----+-------------+-----------+------+---------+------+-------------------------------------------------+------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+-------------+-----------+------+---------+------+-------------------------------------------------+------------------+----------+ | 3 | system user | | d | Connect | 0 | Write_rows_log_event::write_row(-1) on table t1 | NULL | 0.000 | | 4 | system user | | NULL | Connect | 121 | Waiting for master to send event | NULL | 0.000 | | 7 | root | localhost | d | Query | 0 | init | show processlist | 0.000 | +----+-------------+-----------+------+---------+------+-------------------------------------------------+------------------+----------+
Progress is always zero.
I think the "progress" feature was implemented by Monty (Cc:'ed). If I understand correctly, "progress" means progress of one query, not of a complete transaction. So surely, it should be the same for a replication thread? If you were to count events in an event group, you would get progress of the transaction. And it would be a very crude metric, since typically different events can take very different amounts of time to execute. You could should be the percentage of one row event that has been completed? I think the row event is completely in-memory, so that should be easy. I think there can be multiple row events for one source statement on the master, so it might also not perfectly match the normal meaning of "progress". Did you consider the performance impact of updating the progress? I would worry that updating eg. for every row operation would be prohibitively expensive. - Kristian.