Re: [Maria-developers] [JIRA] (MDEV-7557) Option to put into slow log any transaction that was retried in parallel replication

"Sergei Golubchik (JIRA)" <jira@mariadb.atlassian.net> writes:
Key: MDEV-7557 URL: https://mariadb.atlassian.net/browse/MDEV-7557
I'm not sure that slow log is a good match for this kind of events
Right. So do you have a suggestion for a better way? I was thinking on --log-queries-not-using-indexes, which similarly uses the slow query log to expose certain kinds of problematic queries. So queries that cause deadlocks could be another useful filter for the slow log (it should then probably be for all queries that deadlock, not just replication queries). In non-parallel replication, we put deadlock errors as warnings in the error log. But I disabled that for parallel replication. In non-parallel replication, you normally do not expect any deadlocks (since there is only one thread, how can it deadlock?). But in parallel replication, deadlocks are generally unavoidable, and not harmful. And DBAs do not like noise in the error logs that does not indicate a problem and cannot be removed. One option might be to log deadlocks as INFO level in the error log, and then users can temporarily raise verbosity level to see them? Another option could be to add an option to enable/disable logging deadlocks as warnings in parallel replication. (Though probably you will think as me, that this feels a bit like too ad-hoc an option to add.) Any other ideas? - Kristian.

----- Original Message -----
great feature request.
I'm not sure that slow log is a good match for this kind of events
It only makes it hard if the format is incompatible with mysqldumpslow
Use a variable long_rollback_time as the trigger. The query time is generally unavoidable however if the rollback time (for all retries) for the queries starts to rise that's when you want to notice. The log should show the number of rollbacks as well. I'd be happy if this included application rollbacks too but isn't essential. Slow query log I think is a reasonable fit as log-slow-verbosity=query_plan,explain gives you a fairly good idea as to which indexes are locked. -- Daniel Black, Engineer @ Open Query (http://openquery.com.au) Remote expertise & maintenance for MySQL/MariaDB server environments.
participants (2)
-
Daniel Black
-
Kristian Nielsen