Skip to content

Commit 3a233a0

Browse files
committed
feat(model-server): make the Ignite cache size configurable
Adds the database JVM property ignite.cache.size, which can be used to control the off heap Ignite cache size when using Postgres as a backend. The property defaults to the previous 100 Mb size.
1 parent 2dd4605 commit 3a233a0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

model-server/src/main/resources/org/modelix/model/server/store/database.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ jdbc.url=jdbc:postgresql://localhost:54333/
33
jdbc.schema=modelix
44
jdbc.user=modelix
55
jdbc.pw=modelix
6+
# Size of the ignite cache in bytes. Defaults to 100 Mb.
7+
ignite.cache.size=104857600

model-server/src/main/resources/org/modelix/model/server/store/ignite.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<!-- Redefining the default region's settings -->
6767
<property name="defaultDataRegionConfiguration">
6868
<bean class="org.apache.ignite.configuration.DataRegionConfiguration">
69-
<property name="maxSize" value="#{100L * 1024 * 1024}"/>
69+
<property name="maxSize" value="${ignite.cache.size}"/>
7070
<!--<property name="evictionThreshold" value="0.5"/>-->
7171
<property name="pageEvictionMode" value="RANDOM_LRU" />
7272
<property name="emptyPagesPoolSize" value="2000" />

0 commit comments

Comments
 (0)