qsync: provide box.info.synchro interface for monitoring
In commit 14fa5fd8 (cfg: support symbolic evaluation of replication_synchro_quorum) we implemented support of symbolic evaluation of `replication_synchro_quorum` parameter and there is no easy way to obtain it current run-time value, ie evaluated number value. Moreover we would like to fetch queue length on transaction limbo for tests and extend this statistics in future. Thus lets add them. Closes #5191 Signed-off-by:Cyrill Gorcunov <gorcunov@gmail.com> @TarantoolBot document Title: Provide `box.info.synchro` interface The `box.info.synchro` leaf provides information about details of synchronous replication. In particular `quorum` represent the current value of synchronous replication quorum defined by `replication_synchro_quorum` configuration parameter because it can be set as dynamic formula such as `N/2+1` and the value depends on current number of replicas. Since synchronous replication does not commit data immediately but waits for its propagation to replicas the data sits in a queue gathering `commit` responses from remote nodes. Current number of entries waiting in the queue is shown via `queue.len` member. A typical output is the following ``` Lua tarantool> box.info.synchro --- - queue: len: 0 quorum: 1 ... ``` The `len` member shows current number of entries in the queue. And the `quorum` member shows an evaluated value of `replication_synchro_quorum` parameter.
Showing
- changelogs/unreleased/box-info-limbo.md 4 additions, 0 deletionschangelogs/unreleased/box-info-limbo.md
- src/box/lua/info.c 22 additions, 0 deletionssrc/box/lua/info.c
- src/box/txn_limbo.c 4 additions, 1 deletionsrc/box/txn_limbo.c
- src/box/txn_limbo.h 4 additions, 0 deletionssrc/box/txn_limbo.h
- test/box/info.result 1 addition, 0 deletionstest/box/info.result
- test/replication/gh-5446-qsync-eval-quorum.result 49 additions, 25 deletionstest/replication/gh-5446-qsync-eval-quorum.result
- test/replication/gh-5446-qsync-eval-quorum.test.lua 34 additions, 14 deletionstest/replication/gh-5446-qsync-eval-quorum.test.lua
- test/replication/qsync_basic.result 35 additions, 5 deletionstest/replication/qsync_basic.result
- test/replication/qsync_basic.test.lua 19 additions, 2 deletionstest/replication/qsync_basic.test.lua
Loading
Please register or sign in to comment