Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use path hash for repair step comparison for performance
  • Loading branch information
tomneedham committed Nov 6, 2017
commit 5756f189c2e8b0684f9f25aa840f21fd132cd492
4 changes: 2 additions & 2 deletions lib/private/repair/repairmismatchfilecachepath.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private function fixEntryPath(LogOutput $out, $fileId, $wrongPath, $correctStora
if ($correctPath === '' && $this->connection->getDatabasePlatform() instanceof OraclePlatform) {
$qb->andWhere($qb->expr()->isNull('path'));
} else {
$qb->andWhere($qb->expr()->eq('path', $qb->createNamedParameter($correctPath)));
$qb->andWhere($qb->expr()->eq('path_hash', md5($qb->createNamedParameter($correctPath))));
}
$entryExisted = $qb->execute() > 0;

Expand Down Expand Up @@ -372,7 +372,7 @@ private function getOrCreateEntry($storageId, $path, $reuseFileId = null) {
if ($path === '' && $this->connection->getDatabasePlatform() instanceof OraclePlatform) {
$qb->andWhere($qb->expr()->isNull('path'));
} else {
$qb->andWhere($qb->expr()->eq('path', $qb->createNamedParameter($path)));
$qb->andWhere($qb->expr()->eq('path_hash', md5($qb->createNamedParameter($path))));
}
$results = $qb->execute();
$rows = $results->fetchAll();
Expand Down