Skip to content

Commit 0270aad

Browse files
committed
fix(files): Use isRetryable to catch retryable exceptions
Signed-off-by: Louis Chemineau <[email protected]>
1 parent bab9125 commit 0270aad

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/private/Files/Cache/Cache.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
*/
88
namespace OC\Files\Cache;
99

10-
use Doctrine\DBAL\Exception\RetryableException;
1110
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
11+
use OC\DB\Exceptions\DbalException;
1212
use OC\Files\Search\SearchComparison;
1313
use OC\Files\Search\SearchQuery;
1414
use OC\Files\Storage\Wrapper\Encryption;
@@ -696,7 +696,11 @@ public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
696696
} catch (\OC\DatabaseException $e) {
697697
$this->connection->rollBack();
698698
throw $e;
699-
} catch (RetryableException $e) {
699+
} catch (DbalException $e) {
700+
if (!$e->isRetryable()) {
701+
throw $e;
702+
}
703+
700704
// Simply throw if we already retried 4 times.
701705
if ($i === $retryLimit) {
702706
throw $e;

0 commit comments

Comments
 (0)