Merge pull request #2633 from hapifhir/hotfix/broken-refresher-cache
Fix for multitenant environment cache refreshing
This commit is contained in:
commit
95f951e776
|
@ -24,6 +24,7 @@ import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
|||
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
|
||||
import ca.uhn.fhir.jpa.dao.data.IResourceTableDao;
|
||||
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||
import ca.uhn.fhir.jpa.partition.SystemRequestDetails;
|
||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||
import ca.uhn.fhir.jpa.util.QueryChunker;
|
||||
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
||||
|
@ -52,7 +53,7 @@ public class ResourceVersionSvcDaoImpl implements IResourceVersionSvc {
|
|||
public ResourceVersionMap getVersionMap(String theResourceName, SearchParameterMap theSearchParamMap) {
|
||||
IFhirResourceDao<?> dao = myDaoRegistry.getResourceDao(theResourceName);
|
||||
|
||||
List<Long> matchingIds = dao.searchForIds(theSearchParamMap, null).stream()
|
||||
List<Long> matchingIds = dao.searchForIds(theSearchParamMap, new SystemRequestDetails()).stream()
|
||||
.map(ResourcePersistentId::getIdAsLong)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
|
|
@ -180,6 +180,11 @@ public class RequestPartitionHelperSvc implements IRequestPartitionHelperSvc {
|
|||
if (myPartitionSettings.isPartitioningEnabled()) {
|
||||
boolean nonPartitionableResource = myNonPartitionableResourceNames.contains(theResourceType);
|
||||
|
||||
//TODO GGG eventually, theRequest will not be allowed to be null here, and we will pass through SystemRequestDetails instead.
|
||||
if (theRequest == null && nonPartitionableResource) {
|
||||
return RequestPartitionId.defaultPartition();
|
||||
}
|
||||
|
||||
if (theRequest instanceof SystemRequestDetails) {
|
||||
requestPartitionId = getSystemRequestPartitionId(theRequest, nonPartitionableResource);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue