Bump core library
This commit is contained in:
parent
d60d07b697
commit
8aef580aed
|
@ -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());
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue