aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2024-06-10 18:01:39 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-06-12 08:15:08 +0000
commitb7cd197315281ef2a6aa0ecb35c8ea4f75a830b0 (patch)
tree451503dd2e59db0e3b95e30b220ba5f0e7754c7b /lib/private
parenta51237a7a1af60af34ebd1662889630eed44fd88 (diff)
downloadnextcloud-server-b7cd197315281ef2a6aa0ecb35c8ea4f75a830b0.tar.gz
nextcloud-server-b7cd197315281ef2a6aa0ecb35c8ea4f75a830b0.zip
fix(files): Use isRetryable to catch retryable exceptions
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Cache/Cache.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php
index 5267b8a8153..5be524898cd 100644
--- a/lib/private/Files/Cache/Cache.php
+++ b/lib/private/Files/Cache/Cache.php
@@ -40,8 +40,8 @@
namespace OC\Files\Cache;
-use Doctrine\DBAL\Exception\RetryableException;
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
+use OC\DB\Exceptions\DbalException;
use OC\Files\Search\SearchComparison;
use OC\Files\Search\SearchQuery;
use OC\Files\Storage\Wrapper\Encryption;
@@ -729,7 +729,11 @@ class Cache implements ICache {
} catch (\OC\DatabaseException $e) {
$this->connection->rollBack();
throw $e;
- } catch (RetryableException $e) {
+ } catch (DbalException $e) {
+ if (!$e->isRetryable()) {
+ throw $e;
+ }
+
// Simply throw if we already retried 4 times.
if ($i === $retryLimit) {
throw $e;