Skip to content

Commit cf32c34

Browse files
joshtrichardsbackportbot[bot]
authored andcommitted
fix(db): Log loong transaction times at debug level
Signed-off-by: Josh <josh.t.richards@gmail.com>
1 parent f707984 commit cf32c34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/private/DB/Connection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ public function commit() {
688688
$timeTook = microtime(true) - $this->transactionActiveSince;
689689
$this->transactionActiveSince = null;
690690
if ($timeTook > 1) {
691-
$this->logger->warning('Transaction took ' . $timeTook . 's', ['exception' => new \Exception('Transaction took ' . $timeTook . 's')]);
691+
$this->logger->debug('Transaction took ' . $timeTook . 's', ['exception' => new \Exception('Transaction took ' . $timeTook . 's')]);
692692
}
693693
}
694694
return $result;
@@ -700,7 +700,7 @@ public function rollBack() {
700700
$timeTook = microtime(true) - $this->transactionActiveSince;
701701
$this->transactionActiveSince = null;
702702
if ($timeTook > 1) {
703-
$this->logger->warning('Transaction rollback took longer than 1s: ' . $timeTook, ['exception' => new \Exception('Long running transaction rollback')]);
703+
$this->logger->debug('Transaction rollback took longer than 1s: ' . $timeTook, ['exception' => new \Exception('Long running transaction rollback')]);
704704
}
705705
}
706706
return $result;

0 commit comments

Comments
 (0)