Merge pull request #43542 from nextcloud/fix/db/long-transaction-exception-message

fix(db): Unify long transaction log/exception message
This commit is contained in:
Arthur Schiwon 2024-02-13 10:13:14 +01:00 committed by GitHub
commit fd04f058c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -671,7 +671,7 @@ class Connection extends PrimaryReadReplicaConnection {
$timeTook = microtime(true) - $this->transactionActiveSince;
$this->transactionActiveSince = null;
if ($timeTook > 1) {
$this->logger->warning('Transaction took longer than 1s: ' . $timeTook, ['exception' => new \Exception('Long running transaction')]);
$this->logger->warning('Transaction took ' . $timeTook . 's', ['exception' => new \Exception('Transaction took ' . $timeTook . 's')]);
}
}
return $result;