Skip to content

Commit a6adb06

Browse files
committed
Update text after review
1 parent 34d38b1 commit a6adb06

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

doc/reference/reference_lua/box_info.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ variables.
2828
* **pid** is the process ID. This value is also shown by
2929
:ref:`tarantool <tarantool-build>` module
3030
and by the Linux command ``ps -A``.
31-
* **ro** is ``true`` if the instance is in "read-only" mode
31+
* **ro** is ``true`` if the instance is in read-only mode
3232
(same as :ref:`read_only <cfg_basic-read_only>` in ``box.cfg{}``),
3333
or if status is 'orphan'.
3434
* **ro_reason** is ``nil`` if the instance is in writable mode.
35-
When the field is ``true``, it reports an error reason.
35+
When the field is not ``nil``, it contains a reason why the instance is read-only.
36+
Possible error reasons: ``election``, ``synchro``, ``config``, and ``orphan``
37+
(see :ref:`box.info.ro_reason <box_info_ro-reason>` for details).
3638
* **signature** is the sum of all ``lsn`` values from each :ref:`vector clock <replication-vector>`
3739
(**vclock**) for all instances in the replica set.
3840
* **sql().cache.size** is the number of bytes in the SQL prepared statement cache.
@@ -98,7 +100,7 @@ Below is a list of all ``box.info`` functions and members.
98100
- Show the current state of synchronous replication
99101

100102
* - :doc:`./box_info/ro_reason`
101-
- List of all error reasons for the ``box.info.ro_reason`` field
103+
- Show the current mode of an instance (writable or read-only)
102104

103105
.. toctree::
104106
:hidden:

doc/reference/reference_lua/box_info/ro_reason.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ box.info.ro_reason
66

77
.. module:: box.info
88

9+
.. data:: ro_reason
10+
11+
Since :doc:`2.10.0 </release/2.10.0>`.
12+
Show the current mode of an instance (writable or read-only).
13+
Contains ``nil`` if the instance is in writable mode.
14+
When the field is not ``nil``, it reports a reason why the instance is read-only.
15+
916
Possible error reasons:
1017

1118
* ``election`` -- the instance is not a leader.
@@ -20,3 +27,14 @@ box.info.ro_reason
2027

2128
* ``orphan`` -- the instance is in ``orphan`` state.
2229
For details, see :ref:`the orphan status page <internals-replication-orphan_status>`.
30+
31+
:rtype: string
32+
33+
**Example:**
34+
35+
.. code-block:: tarantoolsession
36+
37+
tarantool> box.info.ro_reason
38+
---
39+
- null
40+
...

0 commit comments

Comments
 (0)