Skip to content

Commit c23214e

Browse files
committed
Adds hierarchy table description
Since 3.3.0 the ``hierarchy`` table shows names of the group, replicaset, and the instance itself Table is reported in ``config:info()``; ``config:info('v2')``; ``box.info.config`` Fixes 4608
1 parent 00a19a3 commit c23214e

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

doc/reference/reference_lua/box_info/config.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ box.info.config
1313
The instance's state in regard to configuration.
1414
Note that ``box.info.config`` returns the instance's state obtained using :ref:`config:info('v2') <config_api_reference_info>`.
1515

16+
Since version :doc:`3.3.0 </release/3.3.0>`
17+
Returns the ``hierarchy`` table, showing names of the group, replicaset, and the instance itself.
18+
1619
:rtype: table
1720

1821
**Example**
@@ -26,4 +29,8 @@ box.info.config
2629
last: &0 []
2730
active: *0
2831
alerts: []
32+
hierarchy:
33+
group: group-001
34+
replicaset: replicaset-001
35+
instance: instance-001
2936
...

doc/reference/reference_lua/box_info/info.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ box.info()
1717
:return: keys and values in the submodule
1818
:rtype: table
1919

20+
Since version :doc:`3.3.0 </release/3.3.0>`
21+
Returns the ``hierarchy`` table, showing names of the group, replicaset, and the instance itself.
22+
2023
**Example**
2124

2225
This example is for a master-replica set that contains one master instance
@@ -94,4 +97,8 @@ box.info()
9497
last: &0 []
9598
active: *0
9699
alerts: []
100+
hierarchy:
101+
group: group-001
102+
replicaset: replicaset-001
103+
instance: instance-001
97104
...

doc/reference/reference_lua/config.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ config API
159159

160160
- ``alerts`` -- warnings or errors raised on an attempt to apply the configuration
161161

162+
Since version :doc:`3.3.0 </release/3.3.0>`
163+
164+
- ``hierarchy`` -- table, showing names of the group, replicaset, and the instance itself.
165+
162166
Below are a few examples demonstrating how the ``info()`` output might look.
163167

164168
**Example: no configuration warnings or errors**
@@ -174,6 +178,10 @@ config API
174178
last: &0 []
175179
active: *0
176180
alerts: []
181+
hierarchy:
182+
group: group-001
183+
replicaset: replicaset-001
184+
instance: instance-001
177185
...
178186
179187
**Example: configuration warnings**
@@ -196,6 +204,10 @@ config API
196204
upgrade has not been performed, or the privilege write has failed (separate
197205
alert reported)
198206
timestamp: 2024-07-03T18:09:18.826138+0300
207+
hierarchy:
208+
group: group-001
209+
replicaset: replicaset-001
210+
instance: instance-001
199211
...
200212
201213
This warning is cleared when the ``bands`` space is created.
@@ -219,6 +231,10 @@ config API
219231
allowed: 0, fatal, 1, syserror, 2, error, 3, crit, 4, warn, 5, info, 6, verbose,
220232
7, debug'
221233
timestamp: 2024-07-03T18:13:19.755454+0300
234+
hierarchy:
235+
group: group-001
236+
replicaset: replicaset-001
237+
instance: instance-001
222238
...
223239
224240
**Example: configuration errors (centralized configuration storage)**
@@ -248,6 +264,10 @@ config API
248264
8, but only the following values are allowed: 0, fatal, 1, syserror, 2, error,
249265
3, crit, 4, warn, 5, info, 6, verbose, 7, debug'
250266
timestamp: 2024-07-03T15:22:06.438275Z
267+
hierarchy:
268+
group: group-001
269+
replicaset: replicaset-001
270+
instance: instance-001
251271
...
252272
253273

0 commit comments

Comments
 (0)