From 4558651b580ff9c05bdd4ea410ca7405f93fddbe Mon Sep 17 00:00:00 2001 From: cburlinchon Date: Wed, 28 Mar 2018 11:44:07 +0100 Subject: [PATCH] ENT-1716 Documentation for hot cold ha (#628) --- docs/source/high-availablility.rst | 11 +++++++++++ .../corda/node/services/persistence/RunOnceService.kt | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/source/high-availablility.rst b/docs/source/high-availablility.rst index beb3c7b67c..09d0aa7a96 100644 --- a/docs/source/high-availablility.rst +++ b/docs/source/high-availablility.rst @@ -42,6 +42,17 @@ The configuration snippet below shows the relevant settings. } } +Fields +------ + +:on: Whether hot cold high availability is turned on, defaulted to ``false``. + +:machineName: Unique name for node. + +:updateInterval: Rate(milliseconds) at which the running node updates the mutual exclusion lease. + +:waitInterval: Amount of time(milliseconds) to wait since last mutual exclusion lease update before being able to become the master node. This has to be greater than updateInterval. + Hot Warm ~~~~~~~~ diff --git a/node/src/main/kotlin/net/corda/node/services/persistence/RunOnceService.kt b/node/src/main/kotlin/net/corda/node/services/persistence/RunOnceService.kt index 26d9b9e3fe..f6eba8780e 100644 --- a/node/src/main/kotlin/net/corda/node/services/persistence/RunOnceService.kt +++ b/node/src/main/kotlin/net/corda/node/services/persistence/RunOnceService.kt @@ -35,10 +35,11 @@ const val VERSION = "version" * Makes sure only one node is able to write to database. * Running node updates row whilst running. When a node starts up, it checks no one has updated row within a specified time frame. * - * @property pid process id + * @property machineName unique name for node. + * @property pid process id. * @property updateInterval rate(milliseconds) at which the running node updates row. * @property waitInterval amount of time(milliseconds) to wait since last row update before being able to become the master node. - * @property updateExecutor runs a row update every [updateInterval] milliseconds + * @property updateExecutor runs a row update every [updateInterval] milliseconds. */ class RunOnceService(private val database: CordaPersistence, private val machineName: String, private val pid: String, private val updateInterval: Long, private val waitInterval: Long,