]> gerrit.simantics Code Review - simantics/platform.git/commit - bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java
Some fixes/cleanup for cluster table size caching logic. 95/1195/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sun, 5 Nov 2017 11:52:32 +0000 (13:52 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Sun, 5 Nov 2017 11:52:32 +0000 (13:52 +0200)
commit0da8a106b00aead3a4bcdbaf1e911b4eb1845a24
tree93635b240d3ca97e05ad76b2d1fe2e731110310f
parent4e11ae2950a62b7b720bcf2b7b8f9dc7e8cc4216
Some fixes/cleanup for cluster table size caching logic.

The previous code was not keeping the cached size properly up-to-date
which resulted in the DB client thinking that the consumer cluster
memory size is larger than it actually is and eventually winding up in a
state where the LRU importanceMap is constantly almost empty and the
code keeps throwing away clusters whenever the next cluster is loaded
due the misconception of used cluster memory.

The code is still not perfect/totally functional - I was still able to
get the thrashing situation to reproduce with A6 model imports, but not
as heavily as originally. I was able to import models with much more
initial conditions stored than previously without these changes.

refs #7598

Change-Id: I039fa2062908c05a61efb28e695daec01afd1725
bundles/org.simantics.acorn/src/org/simantics/acorn/lru/ClusterInfo.java
bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/SessionGarbageCollection.java
bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/ClusterTable.java
bundles/org.simantics.db.procore/src/org/simantics/db/procore/cluster/ClusterImpl.java