Skip to content

Commit dca6d47

Browse files
authored
Add compat.box_info_cluster_meaning (#4584)
Resolves #3465 Follow-up on #4427
1 parent 344ba58 commit dca6d47

File tree

4 files changed

+77
-1
lines changed

4 files changed

+77
-1
lines changed

doc/reference/configuration/configuration_reference.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ The ``compat`` section defines values of the :ref:`compat <compat-module>` modul
505505
- ``new``: show the entire cluster
506506
- ``old:``: show the current replica set
507507

508+
See also: :ref:`compat-option-box-info-cluster`
509+
508510
|
509511
| Type: string
510512
| Possible values: 'new', 'old'

doc/reference/reference_lua/box_info/cluster.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ box.info.cluster
1313

1414
* ``name`` -- the cluster name
1515

16-
See also: :ref:`compat.box_info_cluster_meaning <configuration_reference_compat_cluster_meaning>`
16+
See also: :ref:`compat.box_info_cluster_meaning <compat-option-box-info-cluster>`
1717

1818
:rtype: table

doc/reference/reference_lua/compat.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Below are the available ``compat`` options:
7373
* :doc:`sql_seq_scan_default <./compat/sql_seq_scan_default>`
7474
* :doc:`fiber_slice_default <./compat/fiber_slice_default>`
7575
* :doc:`binary_data_decoding <./compat/binary_data_decoding>`
76+
* :doc:`box_info_cluster_meaning <./compat/box_info_cluster_meaning>`
7677

7778
.. toctree::
7879
:hidden:
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
.. _compat-option-box-info-cluster:
2+
3+
Meaning of box.info.cluster
4+
===========================
5+
6+
Option: ``box_info_cluster_meaning``
7+
8+
Starting from version 3.0, the :ref:`box_info_cluster` table stores the information
9+
about the entire cluster. In earlier versions, it stored only the current replica set
10+
information. The ``box_info_cluster_meaning`` compat option in Tarantool 3.0 or later
11+
allows to rollback to the old meaning of ``box.info.cluster`` - display information
12+
about a single replica set.
13+
14+
Old and new behavior
15+
--------------------
16+
17+
New behavior: ``box.info.cluster`` displays information about the entire
18+
cluster with all its replica sets.
19+
20+
.. code-block:: tarantoolsession
21+
22+
tarantool> compat.box_info_cluster_meaning = 'new'
23+
---
24+
...
25+
26+
tarantool> box.info.cluster
27+
---
28+
- name: my_cluster
29+
...
30+
31+
tarantool> box.info.replicaset
32+
---
33+
- uuid: 0a3ff0c7-9075-441c-b0f5-b93a24be07cb
34+
name: router-001
35+
...
36+
37+
.. note::
38+
39+
In the new behavior, :ref:`box_info_replicaset` is equivalent to the old ``box.info.cluster``.
40+
41+
Old behavior: ``box.info.cluster`` displays information about the current replica set.
42+
43+
.. code-block:: tarantoolsession
44+
45+
tarantool> compat.box_info_cluster_meaning = 'old'
46+
---
47+
...
48+
49+
tarantool> box.info.cluster
50+
---
51+
- uuid: 0a3ff0c7-9075-441c-b0f5-b93a24be07cb
52+
name: router-001
53+
...
54+
55+
tarantool> box.info.replicaset
56+
---
57+
- uuid: 0a3ff0c7-9075-441c-b0f5-b93a24be07cb
58+
name: router-001
59+
...
60+
61+
Known compatibility issues
62+
--------------------------
63+
64+
``vshard`` versions earlier than 0.1.24 do not support the new behavior.
65+
66+
67+
Detecting issues in your codebase
68+
---------------------------------
69+
70+
Look for all usages of ``box.info.cluster``, ``info.cluster``, and
71+
``.cluster``, ``['cluster']``, ``["cluster"]`` in the application code
72+
written before the change. To make it work the same way on Tarantool 3.0 or later,
73+
replace the ``cluster`` key with ``replicaset``.

0 commit comments

Comments
 (0)