mirror of
https://github.com/nextcloud/server.git
synced 2026-04-23 15:21:00 -04:00
fix(db): Log loong transaction times at debug level
Signed-off-by: Josh <josh.t.richards@gmail.com>
This commit is contained in:
parent
ae4a6e8d44
commit
48b47f7903
1 changed files with 2 additions and 2 deletions
|
|
@ -680,7 +680,7 @@ class Connection extends PrimaryReadReplicaConnection {
|
|||
$timeTook = microtime(true) - $this->transactionActiveSince;
|
||||
$this->transactionActiveSince = null;
|
||||
if ($timeTook > 1) {
|
||||
$this->logger->warning('Transaction took ' . $timeTook . 's', ['exception' => new \Exception('Transaction took ' . $timeTook . 's')]);
|
||||
$this->logger->debug('Transaction took ' . $timeTook . 's', ['exception' => new \Exception('Transaction took ' . $timeTook . 's')]);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
|
@ -692,7 +692,7 @@ class Connection extends PrimaryReadReplicaConnection {
|
|||
$timeTook = microtime(true) - $this->transactionActiveSince;
|
||||
$this->transactionActiveSince = null;
|
||||
if ($timeTook > 1) {
|
||||
$this->logger->warning('Transaction rollback took longer than 1s: ' . $timeTook, ['exception' => new \Exception('Long running transaction rollback')]);
|
||||
$this->logger->debug('Transaction rollback took longer than 1s: ' . $timeTook, ['exception' => new \Exception('Long running transaction rollback')]);
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
|
|
|||
Loading…
Reference in a new issue