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
This commit is contained in:
Chirag Aggarwal authored and GitHub committed 2026-06-11 20:19:35 +05:30
1 parent 9c90f4040b
commit 8e4429b6dc
1 file changed
+5 -4
@@ -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;
}