summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
63a7605)
ClusterSmall.toBig was not copying importance over to the constructed
ClusterBig causing importanceMap to go out of sync on the first call to
ClusterSmall.toBig.
refs #7724
Change-Id: I6e56b7f94962de3ec243a9d50775e649f930d0d2
(cherry picked from commit
980d21d8a26dddd2e57dbffdc8f320a76aa0973e)
if (existing.hasVirtual())
cluster.markVirtual();
if (existing.hasVirtual())
cluster.markVirtual();
- long existingImportance = existing.getImportance();
- if (existingImportance != 0)
- importanceMap.remove(existingImportance);
+ importanceMap.remove(existing.getImportance());
if (collectorPolicy != null)
collectorPolicy.removed((ClusterImpl)existing);
if (collectorPolicy != null)
collectorPolicy.removed((ClusterImpl)existing);
int ims = importanceMap.size();
int ihms = countImportantClusters();
int ims = importanceMap.size();
int ihms = countImportantClusters();
-// System.out.format("[%s] Validating ClusterTable: byteSize=%d, hashMap=%d/%d, importanceMap=%d%n",
-// place, sizeInBytes, ihms, clusters.hashMap.size(), ims);
+// System.out.format("[ClusterTable.%s] Validating: byteSize=%d (%d MB), hashMap=%d/%d, importanceMap=%d%n",
+// place, sizeInBytes, sizeInBytes / (1024*1024), ihms, clusters.hashMap.size(), ims);
int i = clusterArray.length;
long size = 0;
int i = clusterArray.length;
long size = 0;
this.clusterMap = new ClusterMap(foreignTable, flatTable);
this.clusterSupport = support;
this.clusterBits = ClusterTraitsBase.getClusterBits(clusterKey);
this.clusterMap = new ClusterMap(foreignTable, flatTable);
this.clusterSupport = support;
this.clusterBits = ClusterTraitsBase.getClusterBits(clusterKey);
- this.importance = clusterTable.timeCounter();
+ this.importance = -clusterTable.timeCounter();
clusterTable.markImmutable(this, getImmutable());
}
void analyse() {
clusterTable.markImmutable(this, getImmutable());
}
void analyse() {
import fi.vtt.simantics.procore.internal.ClusterTable;
import fi.vtt.simantics.procore.internal.SessionImplSocket;
import gnu.trove.map.hash.TIntShortHashMap;
import fi.vtt.simantics.procore.internal.ClusterTable;
import fi.vtt.simantics.procore.internal.SessionImplSocket;
import gnu.trove.map.hash.TIntShortHashMap;
-import gnu.trove.procedure.TIntProcedure;
import gnu.trove.set.hash.TIntHashSet;
final public class ClusterSmall extends ClusterImpl {
import gnu.trove.set.hash.TIntHashSet;
final public class ClusterSmall extends ClusterImpl {
}
if (deleted) return null; // Can't convert deleted cluster to big.
ClusterBig big = new ClusterBig(getClusterUID(), clusterKey, support);
}
if (deleted) return null; // Can't convert deleted cluster to big.
ClusterBig big = new ClusterBig(getClusterUID(), clusterKey, support);
+ big.setImportance(importance);
big.cc = this.cc;
big.cc.clusterImpl = this;
resourceTable.toBig(big, support, this);
big.cc = this.cc;
big.cc.clusterImpl = this;
resourceTable.toBig(big, support, this);