XtraDB does unnecessary slow log stats accounting even with the slow log disabled

Bug #1123915 reported by Alexey Kopytov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Alexey Kopytov
5.1
Won't Fix
Medium
Alexey Kopytov
5.5
Fix Released
Medium
Alexey Kopytov

Bug Description

ha_innobase::external_lock() does some extra stats accounting work for slow log even if neither the slow log itself nor log_slow_verbosity=innodb are enabled:

 if (trx->n_mysql_tables_in_use == 0) {
#ifdef EXTENDED_SLOWLOG
  increment_thd_innodb_stats(thd,
     (unsigned long long) trx->descr->id,
     trx->io_reads,
     trx->io_read,
     trx->io_reads_wait_timer,
     trx->lock_que_wait_timer,
     trx->innodb_que_wait_timer,
     trx->distinct_page_access);

  trx->io_reads = 0;
  trx->io_read = 0;
  trx->io_reads_wait_timer = 0;
  trx->lock_que_wait_timer = 0;
  trx->innodb_que_wait_timer = 0;
  trx->distinct_page_access = 0;
  if (trx->distinct_page_access_hash)
   memset(trx->distinct_page_access_hash, 0, DPAH_SIZE);
#endif

The trx stats themselves are only updated if trx->take_stats is TRUE, but the code above does not check this.

Related branches

tags: added: slow-extended
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Assigning to myself, as this needs to be fixed for internal tests.

Revision history for this message
George Ormond Lorch III (gl-az) wrote : Re: [Bug 1123915] Re: XtraDB does unnecessary slow log stats accounting even with the slow log disabled

Alexey,
Please also consider
https://blueprints.launchpad.net/percona-server/+spec/log-queries-in-memory
which I should be implementing soon. Maybe I would need to add another
option to trigger XtraDB statistics collection but no actual logging to
the traditional slow log. I was hoping to accomplish this task entirely
within the plugin and not rely on any InnoDB/XtraDB changes.

On 2/20/2013 11:03 AM, Alexey Kopytov wrote:
> Assigning to myself, as this needs to be fixed for internal tests.
>
> ** Changed in: percona-server/5.1
> Assignee: Laurynas Biveinis (laurynas-biveinis) => Alexey Kopytov (akopytov)
>
> ** Changed in: percona-server/5.5
> Assignee: Laurynas Biveinis (laurynas-biveinis) => Alexey Kopytov (akopytov)
>

--
George O. Lorch III
Software Engineer, Percona
+1-888-401-3401 x542 US/Arizona (GMT -7)
skype: george.ormond.lorch.iii

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1313

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.