Skip to content

Commit

Permalink
Merge pull request #42922 from nextcloud/fix/db/no-verbose-dirty-quer…
Browse files Browse the repository at this point in the history
…y-logs

fix(db): Remove very verbose dirty query logs
  • Loading branch information
ChristophWurst authored Jan 18, 2024
2 parents 242b367 + ab0d7c0 commit 3d51213
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/private/DB/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ public function executeUpdate(string $sql, array $params = [], array $types = []
public function executeStatement($sql, array $params = [], array $types = []): int {
$tables = $this->getQueriedTables($sql);
$this->tableDirtyWrites = array_unique(array_merge($this->tableDirtyWrites, $tables));
$this->logger->debug('dirty table writes: ' . $sql, ['tables' => $this->tableDirtyWrites]);
$sql = $this->replaceTablePrefix($sql);
$sql = $this->adapter->fixupStatement($sql);
$this->queriesExecuted++;
Expand Down Expand Up @@ -644,16 +643,6 @@ private function getMigrator() {
}
}

protected function performConnect(?string $connectionName = null): bool {
$before = $this->isConnectedToPrimary();
$result = parent::performConnect($connectionName);
$after = $this->isConnectedToPrimary();
if (!$before && $after) {
$this->logger->debug('Switched to primary database', ['exception' => new \Exception()]);
}
return $result;
}

public function beginTransaction() {
if (!$this->inTransaction()) {
$this->transactionActiveSince = microtime(true);
Expand Down

0 comments on commit 3d51213

Please sign in to comment.