File tree 2 files changed +25
-1
lines changed
doc/reference/reference_lua
2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ variables.
31
31
* **ro ** is ``true `` if the instance is in "read-only" mode
32
32
(same as :ref: `read_only <cfg_basic-read_only >` in ``box.cfg{} ``),
33
33
or if status is 'orphan'.
34
+ * **ro_reason ** is ``nil `` if the instance is in "writable" mode.
35
+ On a read-only instance ``box.info.ro == true `` it reports an error reason.
34
36
* **signature ** is the sum of all ``lsn `` values from each :ref: `vector clock <replication-vector >`
35
37
(**vclock **) for all instances in the replica set.
36
38
* **sql().cache.size ** is the number of bytes in the SQL prepared statement cache.
@@ -56,7 +58,7 @@ variables.
56
58
* **election ** shows the current state of a replica set node regarding leader
57
59
election (see :doc: `here </reference/reference_lua/box_info/election >`).
58
60
59
- Below is a list of all ``box.info `` functions.
61
+ Below is a list of all ``box.info `` functions and members .
60
62
61
63
.. container :: table
62
64
@@ -95,6 +97,8 @@ Below is a list of all ``box.info`` functions.
95
97
* - :doc: `./box_info/synchro `
96
98
- Show the current state of synchronous replication
97
99
100
+ * - :doc: `./box_info/ro_reason `
101
+ - List of all error reasons for the ``box.info.ro_reason `` field
98
102
99
103
.. toctree ::
100
104
:hidden:
@@ -107,3 +111,4 @@ Below is a list of all ``box.info`` functions.
107
111
box_info/listen
108
112
box_info/election
109
113
box_info/synchro
114
+ box_info/ro_reason
Original file line number Diff line number Diff line change
1
+ .. _box_info_ro-reason :
2
+
3
+ ================================================================================
4
+ box.info.ro_reason
5
+ ================================================================================
6
+
7
+ .. module :: box.info
8
+
9
+ Possible error reasons:
10
+
11
+ * 'election' -- ``box.cfg.election_mode `` is not 'off' and this
12
+ instance is not a leader. See :ref: `box.info.election <box_info_election >` for details.
13
+
14
+ * 'synchro' -- the synchro queue is owned by some other instance.
15
+ For details, see :ref: `box.info.synchro <box_info_synchro >`.
16
+
17
+ * 'config' -- :ref: `box.cfg.read_only <cfg_basic-read_only >` is ``true ``.
18
+
19
+ * 'orphan' -- the instance is in the ``orphan `` state.
You can’t perform that action at this time.
0 commit comments