From d6c35df9bcbc61e7cc5ff54df698612b74350603 Mon Sep 17 00:00:00 2001 From: Ben McIlwain Date: Thu, 2 Oct 2025 14:58:23 -0400 Subject: [PATCH] Ignore single domain failures in remove contacts from all domains action (#2836) When running the action in sandbox on 1.5M domains, it failed a few times updating individual domains (requiring a manual restart of the entire action). It's better to just log the individual failures for manual inspection and then otherwise continue running the action to process the vast majority of other updates that won't fail. BUG = http://b/439636188 --- .../batch/RemoveAllDomainContactsAction.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/google/registry/batch/RemoveAllDomainContactsAction.java b/core/src/main/java/google/registry/batch/RemoveAllDomainContactsAction.java index 7adc18613..713645e52 100644 --- a/core/src/main/java/google/registry/batch/RemoveAllDomainContactsAction.java +++ b/core/src/main/java/google/registry/batch/RemoveAllDomainContactsAction.java @@ -159,12 +159,18 @@ public class RemoveAllDomainContactsAction implements Runnable { private void runDomainUpdateFlow(String repoId) { // Create a new transaction that the flow's execution will be enlisted in that loads the domain // transactionally. This way we can ensure that nothing else has modified the domain in question - // in the intervening period since the query above found it. - boolean success = tm().transact(() -> runDomainUpdateFlowInner(repoId)); - if (success) { - successes++; - } else { - failures++; + // in the intervening period since the query above found it. If a single domain update fails + // permanently, log it and move on to not block processing all the other domains. + try { + boolean success = tm().transact(() -> runDomainUpdateFlowInner(repoId)); + if (success) { + successes++; + } else { + failures++; + } + } catch (Throwable t) { + logger.atWarning().withCause(t).log( + "Failed updating domain with repoId %s; skipping.", repoId); } }