make thread count configurable (#868)
* feat: add configuration for reindex and expunge thread counts * fix formatting
This commit is contained in:
@@ -118,6 +118,8 @@ public class AppProperties {
|
|||||||
private Map<String, RemoteSystem> remote_terminology_service = null;
|
private Map<String, RemoteSystem> remote_terminology_service = null;
|
||||||
private Boolean match_url_cache_enabled = false;
|
private Boolean match_url_cache_enabled = false;
|
||||||
private Boolean index_storage_optimized = false;
|
private Boolean index_storage_optimized = false;
|
||||||
|
private Integer reindex_thread_count = null;
|
||||||
|
private Integer expunge_thread_count = null;
|
||||||
|
|
||||||
public List<String> getCustomInterceptorClasses() {
|
public List<String> getCustomInterceptorClasses() {
|
||||||
return custom_interceptor_classes;
|
return custom_interceptor_classes;
|
||||||
@@ -785,6 +787,22 @@ public class AppProperties {
|
|||||||
index_storage_optimized = theIndex_storage_optimized;
|
index_storage_optimized = theIndex_storage_optimized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getReindex_thread_count() {
|
||||||
|
return reindex_thread_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReindex_thread_count(Integer reindex_thread_count) {
|
||||||
|
this.reindex_thread_count = reindex_thread_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getExpunge_thread_count() {
|
||||||
|
return expunge_thread_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpunge_thread_count(Integer expunge_thread_count) {
|
||||||
|
this.expunge_thread_count = expunge_thread_count;
|
||||||
|
}
|
||||||
|
|
||||||
public JpaStorageSettings.StoreMetaSourceInformationEnum getStore_meta_source_information() {
|
public JpaStorageSettings.StoreMetaSourceInformationEnum getStore_meta_source_information() {
|
||||||
return store_meta_source_information;
|
return store_meta_source_information;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -282,6 +282,21 @@ public class FhirServerConfigCommon {
|
|||||||
|
|
||||||
jpaStorageSettings.setIndexOnContainedResources(appProperties.getEnable_index_contained_resource());
|
jpaStorageSettings.setIndexOnContainedResources(appProperties.getEnable_index_contained_resource());
|
||||||
jpaStorageSettings.setIndexIdentifierOfType(appProperties.getEnable_index_of_type());
|
jpaStorageSettings.setIndexIdentifierOfType(appProperties.getEnable_index_of_type());
|
||||||
|
|
||||||
|
// Configure thread counts for reindex and expunge operations
|
||||||
|
if (appProperties.getReindex_thread_count() != null) {
|
||||||
|
jpaStorageSettings.setReindexThreadCount(appProperties.getReindex_thread_count());
|
||||||
|
ourLog.info(
|
||||||
|
"Server configured to use {} threads for reindex operations",
|
||||||
|
appProperties.getReindex_thread_count());
|
||||||
|
}
|
||||||
|
if (appProperties.getExpunge_thread_count() != null) {
|
||||||
|
jpaStorageSettings.setExpungeThreadCount(appProperties.getExpunge_thread_count());
|
||||||
|
ourLog.info(
|
||||||
|
"Server configured to use {} threads for expunge operations",
|
||||||
|
appProperties.getExpunge_thread_count());
|
||||||
|
}
|
||||||
|
|
||||||
return jpaStorageSettings;
|
return jpaStorageSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -279,6 +279,11 @@ hapi:
|
|||||||
# filter_search_enabled: true
|
# filter_search_enabled: true
|
||||||
# graphql_enabled: true
|
# graphql_enabled: true
|
||||||
|
|
||||||
|
# Thread pool configuration for maintenance operations
|
||||||
|
# Defaults to Runtime.getRuntime().availableProcessors() if not specified
|
||||||
|
# reindex_thread_count: 4 # Number of threads to use for reindex operations
|
||||||
|
# expunge_thread_count: 4 # Number of threads to use for expunge operations
|
||||||
|
|
||||||
# -------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------
|
||||||
# G. Narrative & Validation
|
# G. Narrative & Validation
|
||||||
# -------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user