From 8e4429b6dcffc06efbfd2eb21e2eb264a24a1f17 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Thu, 11 Jun 2026 20:19:35 +0530 Subject: [PATCH] Fix race between rule creation and async orphaned rule cleanup (#12571) * (fix): retry rule creation when orphaned rule is deleted concurrently * (fix): retry mongod startup when init port bind race causes exit 48 * Revert MongoDB startup retry --- src/Appwrite/Platform/Modules/Proxy/Action.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Proxy/Action.php b/src/Appwrite/Platform/Modules/Proxy/Action.php index f2ffc58568..959a27b48b 100644 --- a/src/Appwrite/Platform/Modules/Proxy/Action.php +++ b/src/Appwrite/Platform/Modules/Proxy/Action.php @@ -54,10 +54,11 @@ class Action extends PlatformAction return $dbForPlatform->getDocument('rules', $rule->getId()); }); - if ( - $existingRule->isEmpty() || - $existingRule->getAttribute('domain', '') !== $rule->getAttribute('domain', '') - ) { + if ($existingRule->isEmpty()) { + return true; + } + + if ($existingRule->getAttribute('domain', '') !== $rule->getAttribute('domain', '')) { return false; }