From efe5b7b14055c7c6335492508d5d1f8ff64fdc3c Mon Sep 17 00:00:00 2001 From: Tadgh Date: Fri, 16 Apr 2021 11:24:42 -0400 Subject: [PATCH] Fix package cache usage --- .../ca/uhn/fhir/jpa/packages/JpaPackageCache.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/packages/JpaPackageCache.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/packages/JpaPackageCache.java index 6c64b331a17..76f621729cd 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/packages/JpaPackageCache.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/packages/JpaPackageCache.java @@ -65,7 +65,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; -import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.support.TransactionTemplate; @@ -655,16 +654,8 @@ public class JpaPackageCache extends BasePackageCacheManager implements IHapiPac } private void deleteAndExpungeResourceBinary(IIdType theResourceBinaryId, ExpungeOptions theOptions) { - - if (myPartitionSettings.isPartitioningEnabled()) { - SystemRequestDetails requestDetails = new SystemRequestDetails(); - requestDetails.setTenantId(JpaConstants.DEFAULT_PARTITION_NAME); - getBinaryDao().delete(theResourceBinaryId, requestDetails).getEntity(); - getBinaryDao().forceExpungeInExistingTransaction(theResourceBinaryId, theOptions, requestDetails); - } else { - getBinaryDao().delete(theResourceBinaryId).getEntity(); - getBinaryDao().forceExpungeInExistingTransaction(theResourceBinaryId, theOptions, null); - } + getBinaryDao().delete(theResourceBinaryId, new SystemRequestDetails()).getEntity(); + getBinaryDao().forceExpungeInExistingTransaction(theResourceBinaryId, theOptions, new SystemRequestDetails()); }