Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cluster, replicaset, and instance names #8289

Merged
merged 18 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/unreleased/anon-on-failure-ballot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## bugfix/replication

* Fixed a bug when new instances could try to register via an anon instance
which previously failed to apply `box.cfg{replication_anon = false}`.
19 changes: 19 additions & 0 deletions changelogs/unreleased/global-names.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## feature/replication

* A new option `box.cfg.cluster_name` allows assigning a human-readable name to
the entire cluster. It has to match in all instances and is displayed in
`box.info.cluster.name` (gh-5029).

* A new option `box.cfg.replicaset_name` allows assigning a human-readable name
to the replicaset. It works the same as `box.cfg.replicaset_uuid`. Its value
must be the same across all instances of one replicaset. The replicaset name
is displayed in `box.info.replicaset.name` (gh-5029).

* A new option `box.cfg.instance_name` allows assigning a human-readable name to
the instance. It works the same as `box.cfg.instance_uuid`. Its value must be
unique in the replicaset. The instance name is displayed in `box.info.name`.
Names of other replicas in the same replicaset are visible in
`box.info.replication[id].name` (gh-5029).

* Instance at rebootstrap can change its UUID while keeping its numeric ID if it
has the same non-empty instance name (gh-5029).
6 changes: 6 additions & 0 deletions changelogs/unreleased/info-cluster-rename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## bugfix/core

* **[Breaking change]** The table `box.info.cluster` is renamed to
locker marked this conversation as resolved.
Show resolved Hide resolved
`box.info.replicaset`. The behaviour can be reverted using the `compat` option
`box_info_cluster_meaning`
(https://tarantool.io/compat/box_info_cluster_meaning) (gh-5029).
3 changes: 3 additions & 0 deletions changelogs/unreleased/replicaset-uuid-update-ban.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## bugfix/replication

* Fixed a bug that allowed to change replicaset UUID via `_schema` space.
6 changes: 6 additions & 0 deletions changelogs/unreleased/schema-new-replicaset-uuid-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## bugfix/core

* **[Breaking change]** The key `box.space._schema['cluster']` is renamed to
locker marked this conversation as resolved.
Show resolved Hide resolved
`'replicaset_uuid'`. That is not expected to be breaking because `_schema` is
an internal system space, but the key was visible in public and documented
(gh-5029).
6 changes: 4 additions & 2 deletions src/box/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ include_directories(${EXTRA_BOX_INCLUDE_DIRS})
add_library(box_error STATIC error.cc errcode.c mp_error.cc)
target_link_libraries(box_error core stat mpstream vclock)

add_library(node_name STATIC node_name.c)

add_library(xrow STATIC xrow.c iproto_constants.c iproto_features.c)
target_link_libraries(xrow server core small vclock misc box_error
target_link_libraries(xrow server core small vclock misc box_error node_name
${MSGPUCK_LIBRARIES})

set(tuple_sources
Expand Down Expand Up @@ -324,6 +326,6 @@ add_custom_command(OUTPUT ${SQL_BIN_DIR}/opcodes.c
${SQL_BIN_DIR}/opcodes.h)

target_link_libraries(box box_error tuple stat xrow xlog vclock crc32 raft
${common_libraries})
node_name ${common_libraries})

add_dependencies(box build_bundled_libs generate_sql_files)
Loading