You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An instance in the YAML configuration always has a name and always
corresponds to a particular replicaset and a particular group. This is
forced by the hierarchical configuration format.
These names are now reported in config:info() and box.info.config.
The hierarchy field is an empty table if tarantool is started with a
Lua script or in the interactive mode without a script/a config.
Usually box.info.name equals to box.info.config.hierarchy.instance,
but there are situations, when only one of them is reported.
box.info.config.hierarchy.instance corresponds to the configured
instance name and it is reported when the YAML configuration is in use.
This instance name is written to the database as well, but the write
operation is postponed if the database schema version is lower then
needed to support the persistent names (see 1 for details).
A user can meet this situation while running tarantool 3.x on data from
tarantool 2.x, before the upgrading procedure is performed.
On the other hand, a user may use the persistent names feature (see 2)
together with the classic approach, when tarantool is run without the
configuration file, using a Lua script. In this case, box.info.config.hierarchy is empty, but box.info.name shows the name
passed to box.cfg({instance_name = <...>}) (and written to the
database).
The same is applicable to box.info.replicaset.name and box.info.config.hierarchy.replicaset.
An instance in the YAML configuration always has a name and always
corresponds to a particular replicaset and a particular group. This is
forced by the hierarchical configuration format.
These names are now reported in
config:info()
andbox.info.config
.The
hierarchy
field is an empty table if tarantool is started with aLua script or in the interactive mode without a script/a config.
Usually
box.info.name
equals tobox.info.config.hierarchy.instance
,but there are situations, when only one of them is reported.
box.info.config.hierarchy.instance
corresponds to the configuredinstance name and it is reported when the YAML configuration is in use.
This instance name is written to the database as well, but the write
operation is postponed if the database schema version is lower then
needed to support the persistent names (see 1 for details).
A user can meet this situation while running tarantool 3.x on data from
tarantool 2.x, before the upgrading procedure is performed.
On the other hand, a user may use the persistent names feature (see 2)
together with the classic approach, when tarantool is run without the
configuration file, using a Lua script. In this case,
box.info.config.hierarchy
is empty, butbox.info.name
shows the namepassed to
box.cfg({instance_name = <...>})
(and written to thedatabase).
The same is applicable to
box.info.replicaset.name
andbox.info.config.hierarchy.replicaset
.Requested by @Totktonada in tarantool/tarantool@caf08d4.
The text was updated successfully, but these errors were encountered: