# HG changeset patch # User Sebastien Jodogne # Date 1566636793 -7200 # Node ID f29d75bc5c2533a55b9d3c14d1927fd7065eedfd # Parent 182f4fdeeb472a6c142d619e45bb1a2652febcd2 more info about database locking diff -r 182f4fdeeb47 -r f29d75bc5c25 Sphinx/source/plugins/mysql.rst --- a/Sphinx/source/plugins/mysql.rst Mon Aug 19 09:37:31 2019 +0200 +++ b/Sphinx/source/plugins/mysql.rst Sat Aug 24 10:53:13 2019 +0200 @@ -166,6 +166,8 @@ you want several instances of Orthanc to share the same database, set the ``Lock`` option to ``false`` in the configuration file. -Obviously, one must be very cautious when sharing the same database -between instances of Orthanc. In particular, all these instances -should share the same configuration. +In the absence of locking, the same limitation apply to the +MySQL/MariaDB plugins than to the PostgreSQL plugins (i.e. at most one +instance of Orthanc writing to the database). For more information, +please check out the :ref:`documentation for PostgreSQL +`. diff -r 182f4fdeeb47 -r f29d75bc5c25 Sphinx/source/plugins/postgresql.rst --- a/Sphinx/source/plugins/postgresql.rst Mon Aug 19 09:37:31 2019 +0200 +++ b/Sphinx/source/plugins/postgresql.rst Sat Aug 24 10:53:13 2019 +0200 @@ -209,6 +209,8 @@ configuration of the PostgreSQL plugins. They are documented below. +.. _postgresql-lock: + Locking ^^^^^^^ @@ -240,6 +242,27 @@ between instances of Orthanc. In particular, all these instances should share the same configuration. +Furthermore, the core of Orthanc does not currently support the replay +of database transactions, which is necessary to deal with conflicts +between several instances of Orthanc that would simultaneously write +to the database. + +As a consequence, as of Orthanc 1.5.7, when connecting multiple +Orthanc to a single database by setting ``Lock`` to ``false``, there +should only be one instance of Orthanc acting as a writer and all the +other instances of Orthanc acting as readers only. Be careful to set +the option ``SaveJobs`` to ``false`` in the configuration file of all +the instances of Orthanc acting as readers. + +A refactoring is needed to improve the core of Orthanc in that +respect, for which we are looking for funding/donation from the +industry. Some issues reported in our bug tracker call for this +refactoring: `issue 83 +`__, `issue 121 +`__, `issue 151 +`__. + + Keep-alive ^^^^^^^^^^