replication: add box.info.replication_anon
Closes #4900 @TarantoolBot document Title: add new field to box.info: replication_anon It is now possible to list all the anonymous replicas following the instance with a call to `box.info.replication_anon()` The output is similar to the one produced by `box.info.replication` with an exception that anonymous replicas are indexed by their uuid strings rather then server ids, since server ids have no meaning for anonymous replicas. Note, that when you issue a plain `box.info.replication_anon`, the only info returned is the number of anonymous replicas following the current instance. In order to see the full stats, you have to call `box.info.replication_anon()`. This is done to not overload the `box.info` output with excess info, since there may be lots of anonymous replicas. Example: ``` tarantool> box.info.replication_anon --- - count: 2 ... tarantool> box.info.replication_anon() --- - 3a6a2cfb-7e47-42f6-8309-7a25c37feea1: id: 0 uuid: 3a6a2cfb-7e47-42f6-8309-7a25c37feea1 lsn: 0 downstream: status: follow idle: 0.76203499999974 vclock: {1: 1} f58e4cb0-e0a8-42a1-b439-591dd36c8e5e: id: 0 uuid: f58e4cb0-e0a8-42a1-b439-591dd36c8e5e lsn: 0 downstream: status: follow idle: 0.0041349999992235 vclock: {1: 1} ... ``` Note, that anonymous replicas hide their lsn from the others, so anonymous replica lsn will always be reported as zero, even if anonymous replicas perform some local space operations. To know the anonymous replica's lsn, you have to issue `box.info.lsn` on it.
Showing
- src/box/lua/info.c 50 additions, 0 deletionssrc/box/lua/info.c
- src/box/replication.cc 3 additions, 0 deletionssrc/box/replication.cc
- src/box/replication.h 2 additions, 0 deletionssrc/box/replication.h
- test/box/info.result 1 addition, 0 deletionstest/box/info.result
- test/replication/anon.result 21 additions, 3 deletionstest/replication/anon.result
- test/replication/anon.test.lua 9 additions, 2 deletionstest/replication/anon.test.lua
Loading
Please register or sign in to comment