DB query swapping to file system gitlab #572 Change-Id: I3609ab9207fd01710aeb7c00debae259d1dc08c3 (cherry picked from commit 51cf547b475df8309ca0207c35f97fda0d26abd0)
Fixed platform ontology sync startup failure problems after installs Installing a new plug-in that contains multiple ontologies that depend transitively on each other caused startup failure due to database requests not finding the newly installed ontology that the second installed ontology depends on. The solution is strategic query cache flushes before and after the installation into immutable contexts. Read more about it in the issue. gitlab #464 Change-Id: I1ad28585a85ad3a31cac8e058d0c6872e894be92
Easier baselines gitlab #462 Change-Id: Id79b6070fded8224045f2f044e3dc70c6059363e
Log test name before and after execution with timeout and exec time gitlab #367 Change-Id: I3ff6b1da4e773987bfc1d83fee9cef3f302a3d5e
DB and Layer0 modifications for related issues gitlab #347 gitlab #348 Change-Id: Ic5d2209d9865fc44583ea4814cc1d26d212a5f87
Allow "doNotSynchronizeOntologies" to work. Additionally, using the flag bypasses shared library synchronisation. Change-Id: I384a2f878483be25c92e9644113e4d5b2ae95bca
Speeding up platform startup time Shaved ~1.5seconds off by starting SCL compiler priming at the beginning of platform startup on the background before the LifeCycleProcesses project feature needs the compiler. Also removed seemingly unused VirtualGraphInitializer that installed virtualgraphs/*.tg files into random memory-persistent virtual graphs during platform startup. It simply piles on some startup overhead and does nothing. gitlab #221 Change-Id: I1ebbc4e292957755cd88f2941cd02730ae8605c8
Move shutdown of worker pools to SimanticsPlatform.shutdown() Closing of public worker pools should be done before we are closing our db-connection. The platform-shutdown routine has already started and therefore it should not be meaningful to execute any more work for a closing platform gitlab #212 Change-Id: I9fb8fb0970d649f7b53282be0627bf5387c9dde9
Initial support for concurrency in databoard, bindings and serializers * This fixes the parallellization problem in PlatformUtil.getAllGraphs where parallel streams can now be used. * VariableBinding is removed because it hasn't ever been used and it is deadlock prone and not very useful * Removed SerialisationSupport field from ResourceBinding as it has been commented out for ages now. If we need this at some point, let's add it back. gitlab #180 Change-Id: Ic4240921b5e60ea8d642feb85e9608f936272190
Use PossibleResource query to check if the project resource is present Earlier implementation logged unnecessary ResourceNotFoundException when creating the project resource for the first time in Platform startup. gitlab #148 Change-Id: Ic75180dfdd88770f9a91a2468f639e59afea99e0
Fixed various bugs in TG readers Added primary install-location based relative path resolution to database baselining logic. Secondary relative baseline resolution logic still uses working directory. refs #7825 Change-Id: I154528e674e6d478ea4bdb1de4d38c38d5097fdf
Added graph.tg hash caching to FixExportedOntology Moved generic database baselining code to DatabaseBaselines from SimanticsPlatform and added new utility functions to DataContainers and cleaned up existing methods therein using resource-try statements. Also note org.simantics.graph.refactoring.TransferableGraphHasher that can be used for adding hash values to graph.tg files. refs #7806 Change-Id: I7f54cfb0db68a8a5602fc2a8d9651cb305a8136d
Platform startup performance improvements 1. DB baselining can now be enabled with ontology update checking due to caching of TG hash values in the DataContainer.metadata map field with key "cached.hashCode". This diminishes the time taken by ontology merge need checking to very little time compared to the old system where all graph.tg files were loaded completely into heap memory to simply check whether they need to be merged or not. 2. BaselineCreator application can be used to construct a baseline with a built product in any OS supported by Simantics. To get the benefit from these changes, you'll also need to use the version 0.0.9 of the graph-builder-maven-plugin. refs #7806 Change-Id: I7fadaf43f3c96d3b989a73e0f1ae6e6fa83e09ce
Improve startup time for fresh or rollback'd session in index writing refs #7806 Change-Id: I44ea1e0972bfd360b6af44dbbe62e934e06c59e0
Always discard database undo history after each platform startup. refs #7792 Change-Id: I587d095dbb65e458ff70a4cdf14001f6bee13461
SimanticsPlatform.startUp ensures updateness of installed feature groups Previously the installed feature group update code was only executed when the workspace was first initialized. This does work when new features are installed into Simantics programs running on existing workspaces. refs #7005 Change-Id: I5879c398c966dc5d0e15344569b37610703d5e51
More robust Simantics platform shutdown logic. Added a JVM runtime shutdown hook to ensure that unless the JVM process is killed forcibly, the JVM should attempt properly shutting down the Simantics platform, even if the client code that started the platform fails to do so for any reason. Also marked both SimanticsPlatform.{startUp,shutdown} synchronized to prevent concurrent access to either the start-up or shutdown logic. refs #7650 Change-Id: I8c8022730ed973d80897fb364592881425b0a51f
Support using a DB baseline for faster program startup. Use by specifying the JVM argument -Dorg.simantics.db.baseline=<path to baseline zip file> where the baseline zip file must contain two directories: * db/ which contains the initial database version * .metadata/.plugins/org.simantics.db.indexing which contains the initial database index During baseline initialization, the specified zip file is extracted directly at the root of the workspace directory. The baseline file is hard-linked/copied under the workspace root as a file called `.baseline`. If this file exists, it indicates that the workspace has already been initialized from a baseline archive and should not be initialized/updated anymore. Limitations: * Automatic ontology updates or installation of new ontology plugins is disabled when a database baseline is in use. refs #7211 Change-Id: Id67156c65047b429af71e0eab83b31a5d2fd5117
Do not merge TG if it is not set as immutable refs #7274 Change-Id: I8a13dc2b0bb0cc3cc98c5f661da8b46dae7e0455
Import/export changes. A load. May cause some problems. Exports create Internals instead of blanks if possible. FixExportedOntology treatment now produces tgs that are compatible with Graph Compiler. Import creates L0.ExternalEntity instances for unresolved external references (thus making it fail safe). Note that addBuiltin("http://Projects") was removed from class CoreInitialization because its existence resulted in a non-functioning URI space because: * http://Projects was added as a "built-in resource" when the database is first initialized which means that ReadGraph.getResource("http://Projects") would succeed even when the resource was not yet properly imported from the project ontology * When the project ontology is imported, a new resource is created to represent http://Projects instead of using the existing uninitialized "built-in resource". The L0.ExternalEntity changes made to the standard transferable graph import in this patch caused the code to find the built-in resource for "http://Projects" and think that it has to be a resource that's already properly initialized. This led to the TG import not initializing the resource at all. Previously there was a bug here as well but it was hidden by the fact that the system would import the actual/new "http://Projects" resource from the ontology anyway. This effectively left the uninitialized built-in resource just hanging in the database as trash. refs #7016 Change-Id: I5d9dd8dea4df58cc54d4a6664c112a770ae7f7b3