box: add "leader_name" field to the box.info.election
Prior to this patch, the table had no information about the leader other than his id in the "leader" field. It may not be convenient for the user to search for a name corresponding to a given id. Much more convenient to see the leader's name in box.info.election. Closes #8931 @TarantoolBot document Title: Document `box.info.election` box.info.election now contains one more field: `leader_name`: string. There are several possible values for this field: - `nil`, if there is no leader in a cluster. - `box.NULL`, if there is a leader, but he does not have a name. - `some string`, if there is a leader and he has a name. Example: ```console tarantool> box.info.election --- - leader_idle: 0 leader_name: node1 state: leader vote: 1 term: 3 leader: 1 ... ``` [box-info-election] https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_info/election/
Showing
- changelogs/unreleased/gh-8931-box-info-election-leader-name.md 3 additions, 0 deletions...elogs/unreleased/gh-8931-box-info-election-leader-name.md
- src/box/lua/info.c 8 additions, 0 deletionssrc/box/lua/info.c
- test/replication-luatest/gh_8931_box_info_election_leader_name_test.lua 83 additions, 0 deletions...on-luatest/gh_8931_box_info_election_leader_name_test.lua
Please register or sign in to comment