Merge "objectcache: Escape dots from cache keys in StatsD metrics"
[lhc/web/wiklou.git] / includes / profiler / output / ProfilerOutputDb.php
index 1c3d479..ea5f7ad 100644 (file)
@@ -21,7 +21,6 @@
  * @ingroup Profiler
  */
 
-use Wikimedia\Rdbms\Database;
 use Wikimedia\Rdbms\DBError;
 
 /**
@@ -56,7 +55,7 @@ class ProfilerOutputDb extends ProfilerOutput {
                }
 
                $fname = __METHOD__;
-               $dbw->onTransactionIdle( function ( Database $dbw ) use ( $stats, $fname ) {
+               $dbw->onTransactionCommitOrIdle( function () use ( $stats, $fname, $dbw ) {
                        $pfhost = $this->perHost ? wfHostname() : '';
                        // Sqlite: avoid excess b-tree rebuilds (mostly for non-WAL mode)
                        // non-Sqlite: lower contention with small transactions