Version Store

Installation and Configuration

Learn how to install & configure the Sophora Version Store.

Prerequisites

Every Sophora Server (except for Staging Servers) requires its own Postgres-Database. Currently this must be at least version 15.3. In a production environment we recommend one PostgreSQL server per Sophora Server.

For testing you can create multiple databases on the same (single) PostgreSQL server. We don’t recommend this setup in production because of the single point of failure.

Please refer to your system administrator or the PostgreSQL documentation in order to configure a server and a database properly.

PostgreSQL Connection Configuration

Add the following configuration to your sophora.properties to configure the postgres connection:

PropertyDescription
sophora.persistence.postgres.hostnameSpecifies the host name of the machine on which the PostgreSQL server is running
sophora.persistence.postgres.portSpecifies the port of the machine on which the PostgreSQL server is running
sophora.persistence.postgres.usernamePostgreSQL username with read and write permissions
sophora.persistence.postgres.passwordPostgreSQL password
sophora.persistence.postgres.databaseExisting database in PostgreSQL for Sophora

The PostgreSQL connections are held in a connection pool. The following optional properties can be used to configure the connection pool. If not specified, the properties will take the default values from HikariCP, a Java library for JDBC connection pool.

PropertyDescriptionDefault ValueMin. Value
sophora.persistence.postgres.maxPoolSizeThe maximum number of idle and in-use connections in the pool.101
sophora.persistence.postgres.minIdleConnectionsIf the number of idle connections is lower than this value, it will be restored to this value with the best effort.-0
sophora.persistence.postgres.connectionTimeoutMsThe maximum number of time in milliseconds that the Sophora Server will wait for a connection from the pool.30000 (30s)250
sophora.persistence.postgres.idleTimeoutMsThe maximum number of time in milliseconds that a connection is allowed to sit idle in the pool.10000 (10s)0
sophora.persistence.postgres.validationTimeoutMsThe maximum number of time in milliseconds that the pool will wait for a connection to be validated as alive.5000 (5s)250

Version Store Configuration

Add the following configuration to your sophora.properties to configure the Version Store:

PropertyDescriptionDefault
sophora.versionstore.declutter.cronCron expression to control when the Version Store decluttering job starts to remove old versions.0 0 2 * * ?
sophora.versionstore.maxVersionsToKeepMaximum versions to keep in the Version Store per document before they are marked for deletion.-
sophora.versionstore.maxAgeInDaysMaximum age in days for versions before they are marked for deletion.-
sophora.versionstore.byNodeType.[label].nodeTypeSets the node type for the [label]. Required for all properties starting with sophora.versionstore.byNodeType. All properties following this schema only configure this node type.-
sophora.versionstore.byNodeType.[label].maxVersionsToKeepMaximum versions to keep in the Version Store per document of a specific node type before they are marked for deletion.-
sophora.versionstore.byNodeType.[label].maxAgeInDaysMaximum age in days for versions of a specific node type before they are marked for deletion.-

Last modified on 5/23/23

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon