|
| 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