aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Utils
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-06-10 17:45:52 +0200
committerGitHub <noreply@github.com>2016-06-10 17:45:52 +0200
commit52a0c939ab8674857bbfe9a9fb0ee7308eee960e (patch)
tree8e49d951042f62b1875f43011d0f45652916335b /lib/private/Files/Utils
parent21de838b857e8400b838e2d67a1de3cd40c7aa2d (diff)
parentfce19d22d93d8c36066f5fe67efb86bf257a37c7 (diff)
downloadnextcloud-server-52a0c939ab8674857bbfe9a9fb0ee7308eee960e.tar.gz
nextcloud-server-52a0c939ab8674857bbfe9a9fb0ee7308eee960e.zip
Merge pull request #24863 from owncloud/propagator-batching
Propagator batching for the file scanner
Diffstat (limited to 'lib/private/Files/Utils')
-rw-r--r--lib/private/Files/Utils/Scanner.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php
index 8beba116fe1..e4e5e353f9f 100644
--- a/lib/private/Files/Utils/Scanner.php
+++ b/lib/private/Files/Utils/Scanner.php
@@ -138,7 +138,9 @@ class Scanner extends PublicEmitter {
$this->triggerPropagator($storage, $path);
});
+ $storage->getPropagator()->beginBatch();
$scanner->backgroundScan();
+ $storage->getPropagator()->commitBatch();
}
}
@@ -187,12 +189,14 @@ class Scanner extends PublicEmitter {
$this->db->beginTransaction();
}
try {
+ $storage->getPropagator()->beginBatch();
$scanner->scan($relativePath, \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG | \OC\Files\Cache\Scanner::REUSE_SIZE);
$cache = $storage->getCache();
if ($cache instanceof Cache) {
// only re-calculate for the root folder we scanned, anything below that is taken care of by the scanner
$cache->correctFolderSize($relativePath);
}
+ $storage->getPropagator()->commitBatch();
} catch (StorageNotAvailableException $e) {
$this->logger->error('Storage ' . $storage->getId() . ' not available');
$this->logger->logException($e);