changeset 270:f29d75bc5c25

more info about database locking
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 24 Aug 2019 10:53:13 +0200
parents 182f4fdeeb47
children 1173e40cbf35
files Sphinx/source/plugins/mysql.rst Sphinx/source/plugins/postgresql.rst
diffstat 2 files changed, 28 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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
+<postgresql-lock>`.
--- 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
+<https://bitbucket.org/sjodogne/orthanc/issues/83/>`__, `issue 121
+<https://bitbucket.org/sjodogne/orthanc/issues/121/>`__, `issue 151
+<https://bitbucket.org/sjodogne/orthanc/issues/151/>`__.
+
+
 
 Keep-alive
 ^^^^^^^^^^