diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2024-05-27 10:49:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-27 10:49:42 +0200 |
commit | f781a1aa4a3f1ca13f21172216383780f170c4c9 (patch) | |
tree | ebad71e8945d638e58795bab5da0b447084593fc | |
parent | e3b6dca41d30cf570911559e77330ebd0a601148 (diff) | |
parent | 48b47f7903357dca800ea091efea05c27c269a0a (diff) | |
download | nextcloud-server-f781a1aa4a3f1ca13f21172216383780f170c4c9.tar.gz nextcloud-server-f781a1aa4a3f1ca13f21172216383780f170c4c9.zip |
Merge pull request #45506 from nextcloud/jtr/fix-db-log-long-transactions-debug
fix(db): Log long transaction times at debug level
-rw-r--r-- | lib/private/DB/Connection.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php index 8bf9e6e99b9..81432d9884f 100644 --- a/lib/private/DB/Connection.php +++ b/lib/private/DB/Connection.php @@ -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; |