replication: introduce instance name
The instance name is carried with instance UUID everywhere in the replication protocols. It is visible in all other instances via _cluster and is displayed in monitoring. Part of #5029 @TarantoolBot document Title: `box.cfg.instance_name` and `box.info.name` The new option `box.cfg.instance_name` allows to assign the instance name to a human-readable text value to be displayed in the new info key - `box.info.name`. Instances can see names of their peers in `box.info.replication[id].name`. The name is broadcasted in "box.id" built-in event as "instance_name" key. It is string when set and nil when not set. When set, it has to be unique in the instance's replicaset. If a name wasn't set on cluster bootstrap (was forgotten or the cluster is upgraded from a version < 3.0), then it can be set on an already running instance via `box.cfg.instance_name`. To change or drop an already installed name one has to use `box.cfg.force_recovery == true` in all instances of the cluster. After the name is updated and all the instances synced, the `force_recovery` can be set back to `false`. The name can be <= 63 symbols long, can consist only of chars ['0'-'9'], '-' and 'a'-'z'. It must start with a letter. When upper-case letters are used in `box.cfg`, they are automatically converted to lower-case. The names are host- and DNS-friendly.
Showing
- changelogs/unreleased/global-names.md 6 additions, 0 deletionschangelogs/unreleased/global-names.md
- src/box/alter.cc 81 additions, 2 deletionssrc/box/alter.cc
- src/box/applier.cc 17 additions, 6 deletionssrc/box/applier.cc
- src/box/bootstrap.snap 0 additions, 0 deletionssrc/box/bootstrap.snap
- src/box/box.cc 176 additions, 51 deletionssrc/box/box.cc
- src/box/box.h 1 addition, 0 deletionssrc/box/box.h
- src/box/errcode.h 2 additions, 0 deletionssrc/box/errcode.h
- src/box/iproto_constants.c 1 addition, 0 deletionssrc/box/iproto_constants.c
- src/box/iproto_constants.h 1 addition, 0 deletionssrc/box/iproto_constants.h
- src/box/lua/cfg.cc 13 additions, 0 deletionssrc/box/lua/cfg.cc
- src/box/lua/info.c 18 additions, 0 deletionssrc/box/lua/info.c
- src/box/lua/load_cfg.lua 5 additions, 0 deletionssrc/box/lua/load_cfg.lua
- src/box/lua/upgrade.lua 28 additions, 0 deletionssrc/box/lua/upgrade.lua
- src/box/replication.cc 36 additions, 1 deletionsrc/box/replication.cc
- src/box/replication.h 20 additions, 0 deletionssrc/box/replication.h
- src/box/schema_def.h 1 addition, 0 deletionssrc/box/schema_def.h
- src/box/xrow.c 23 additions, 0 deletionssrc/box/xrow.c
- src/box/xrow.h 6 additions, 0 deletionssrc/box/xrow.h
- test/box-luatest/downgrade_test.lua 12 additions, 0 deletionstest/box-luatest/downgrade_test.lua
- test/box-luatest/gh_7894_export_iproto_constants_and_features_test.lua 1 addition, 0 deletions...est/gh_7894_export_iproto_constants_and_features_test.lua
Loading
Please register or sign in to comment