From dfde993f2d768673c86a9c937d66a5d6c40a788f Mon Sep 17 00:00:00 2001 From: rbhman <65975467+rbhman@users.noreply.github.com> Date: Tue, 1 Jun 2021 10:50:06 -0400 Subject: [PATCH] Allow lower case error message to also trigger retry (#2693) * Allow lower case error message to also trigger retry * similar data integrity exception on different table Co-authored-by: Hedman, Bruno --- .../java/ca/uhn/fhir/jpa/dao/tx/HapiTransactionService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/tx/HapiTransactionService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/tx/HapiTransactionService.java index 5973972f933..0823007ad69 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/tx/HapiTransactionService.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/tx/HapiTransactionService.java @@ -99,7 +99,8 @@ public class HapiTransactionService { * thrown by one of the client threads, so we auto-retry in order to avoid * annopying spurious failures for the client. */ - if (e.getMessage().contains("HFJ_TAG_DEF")) { + if (e.getMessage().contains("HFJ_TAG_DEF") || e.getMessage().contains("hfj_tag_def") || + e.getMessage().contains("HFJ_RES_TAG") || e.getMessage().contains("hfj_res_tag")) { maxRetries = 3; }