aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2024-06-13 10:45:40 +0200
committerGitHub <noreply@github.com>2024-06-13 10:45:40 +0200
commit46bc43145d9316333798af0d07191cb0a2baadbd (patch)
treed2597e8ebd335023d9c36c98db6c3742df0fe8d7
parent61868848aba8fdb44427053b6508a044186114ca (diff)
parent3da39308cd2e6bbc5ab55f95f5971069c577a91f (diff)
downloadnextcloud-server-46bc43145d9316333798af0d07191cb0a2baadbd.tar.gz
nextcloud-server-46bc43145d9316333798af0d07191cb0a2baadbd.zip
Merge pull request #45806 from nextcloud/backport/45768/stable27
[stable27] Use isRetryable to catch retryable exceptions
-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 9822b6874f9..26572af2346 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;
@@ -738,7 +738,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;