Bump core library

This commit is contained in:
jamesagnew 2021-12-07 10:57:43 -05:00
parent d60d07b697
commit 8aef580aed
4 changed files with 87 additions and 31 deletions

View File

@ -6,13 +6,11 @@ import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao;
import ca.uhn.fhir.jpa.config.TestR4Config;
import ca.uhn.fhir.jpa.config.TestR4WithLuceneDisabledConfig;
import ca.uhn.fhir.jpa.dao.BaseJpaTest;
import ca.uhn.fhir.jpa.dao.BaseTransactionProcessor;
import ca.uhn.fhir.jpa.model.entity.ResourceEncodingEnum;
import ca.uhn.fhir.jpa.partition.SystemRequestDetails;
import ca.uhn.fhir.jpa.search.reindex.BlockPolicy;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.util.FileUtil;
import ca.uhn.fhir.util.StopWatch;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang3.Validate;
import org.hl7.fhir.r4.model.Bundle;
import org.hl7.fhir.r4.model.Meta;
@ -179,7 +177,26 @@ public class SyntheaPerfTest extends BaseJpaTest {
throw new InternalErrorException(e);
}
mySystemDao.transaction(new SystemRequestDetails(myInterceptorRegistry), bundle);
int resCount = 0;
int totalBytes = 0;
int maxBytes = 0;
int countOver5kb = 0;
for (Bundle.BundleEntryComponent nextEntry : bundle.getEntry()) {
int size = myCtx.newJsonParser().setPrettyPrint(false).encodeResourceToString(nextEntry.getResource()).length();
resCount++;
totalBytes += size;
if (size > maxBytes) {
maxBytes = size;
}
if (size > 5000) {
countOver5kb++;
}
}
int avg = (int) ((double)totalBytes / (double) resCount);
ourLog.info("Resources {} Average {} Max {} CountOver5 {}", resCount, FileUtil.formatFileSize(avg), FileUtil.formatFileSize(maxBytes), countOver5kb);
// mySystemDao.transaction(new SystemRequestDetails(myInterceptorRegistry), bundle);
int fileCount = myFilesCounter.incrementAndGet();
myResourcesCounter.addAndGet(bundle.getEntry().size());

View File

@ -20,9 +20,9 @@ package ca.uhn.fhir.jpa.model.entity;
* #L%
*/
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import org.hibernate.annotations.OptimisticLock;
import javax.persistence.CascadeType;
@ -67,7 +67,7 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl
@SuppressWarnings("WeakerAccess")
public static final int ENCODING_COL_LENGTH = 5;
public static final String HFJ_RES_VER = "HFJ_RES_VER";
public static final int RES_TEXT_VC_MAX_LENGTH = 5000;
private static final long serialVersionUID = 1L;
@Id
@SequenceGenerator(name = "SEQ_RESOURCE_HISTORY_ID", sequenceName = "SEQ_RESOURCE_HISTORY_ID")
@ -95,12 +95,13 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl
@Lob()
@OptimisticLock(excluded = true)
private byte[] myResource;
@Column(name = "RES_TEXT_VC", length = RES_TEXT_VC_MAX_LENGTH, nullable = true)
@OptimisticLock(excluded = true)
private String myResourceTextVc;
@Column(name = "RES_ENCODING", nullable = false, length = ENCODING_COL_LENGTH)
@Enumerated(EnumType.STRING)
@OptimisticLock(excluded = true)
private ResourceEncodingEnum myEncoding;
@OneToOne(mappedBy = "myResourceHistoryTable", cascade = {CascadeType.REMOVE})
private ResourceHistoryProvenanceEntity myProvenance;
@ -108,6 +109,14 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl
super();
}
public String getResourceTextVc() {
return myResourceTextVc;
}
public void setResourceTextVc(String theResourceTextVc) {
myResourceTextVc = theResourceTextVc;
}
public ResourceHistoryProvenanceEntity getProvenance() {
return myProvenance;
}

View File

@ -277,6 +277,14 @@ public class DaoConfig {
* TODO mb test more with this true
*/
private boolean myAdvancedLuceneIndexing = false;
/**
* If set to a positive number, any resources with a character length at or below the given number
* of characters will be stored inline in the <code>HFJ_RES_VER</code> table instead of using a
* separate LOB column.
*
* @since 7.0.0
*/
private int myInlineResourceTextBelowSize = 0;
/**
* Constructor
@ -300,6 +308,28 @@ public class DaoConfig {
}
}
/**
* If set to a positive number, any resources with a character length at or below the given number
* of characters will be stored inline in the <code>HFJ_RES_VER</code> table instead of using a
* separate LOB column.
*
* @since 7.0.0
*/
public int getInlineResourceTextBelowSize() {
return myInlineResourceTextBelowSize;
}
/**
* If set to a positive number, any resources with a character length at or below the given number
* of characters will be stored inline in the <code>HFJ_RES_VER</code> table instead of using a
* separate LOB column.
*
* @since 7.0.0
*/
public void setInlineResourceTextBelowSize(int theInlineResourceTextBelowSize) {
myInlineResourceTextBelowSize = theInlineResourceTextBelowSize;
}
/**
* Sets the tag storage mode for the server. Default is {@link TagStorageModeEnum#VERSIONED}.
*
@ -2672,6 +2702,28 @@ public class DaoConfig {
myElasicSearchIndexPrefix = thePrefix;
}
/**
* Is lucene/hibernate indexing enabled beyond _contains or _text?
*
* @since 5.6.0
*/
public boolean isAdvancedLuceneIndexing() {
return myAdvancedLuceneIndexing;
}
/**
* Enable/disable lucene/hibernate indexing enabled beyond _contains or _text.
* <p>
* String, token, and reference parameters can be indexed in Lucene.
* This extends token search to support :text searches, as well as supporting
* :contains and :text on string parameters.
*
* @since 5.6.0
*/
public void setAdvancedLuceneIndexing(boolean theAdvancedLuceneIndexing) {
this.myAdvancedLuceneIndexing = theAdvancedLuceneIndexing;
}
public enum StoreMetaSourceInformationEnum {
NONE(false, false),
SOURCE_URI(true, false),
@ -2695,28 +2747,6 @@ public class DaoConfig {
}
}
/**
* Is lucene/hibernate indexing enabled beyond _contains or _text?
*
* @since 5.6.0
*/
public boolean isAdvancedLuceneIndexing() {
return myAdvancedLuceneIndexing;
}
/**
* Enable/disable lucene/hibernate indexing enabled beyond _contains or _text.
*
* String, token, and reference parameters can be indexed in Lucene.
* This extends token search to support :text searches, as well as supporting
* :contains and :text on string parameters.
*
* @since 5.6.0
*/
public void setAdvancedLuceneIndexing(boolean theAdvancedLuceneIndexing) {
this.myAdvancedLuceneIndexing = theAdvancedLuceneIndexing;
}
public enum IndexEnabledEnum {
ENABLED,

View File

@ -766,7 +766,7 @@
<properties>
<fhir_core_version>5.6.3</fhir_core_version>
<fhir_core_version>5.6.7</fhir_core_version>
<ucum_version>1.0.3</ucum_version>
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>