relay: provide information about downstream lag
We already have `box.replication.upstream.lag` entry for monitoring
sake. Same time in synchronous replication timeouts are key properties
for quorum gathering procedure. Thus we would like to know how long
it took of a transaction to traverse `initiator WAL -> network ->
remote applier -> initiator ACK reception` path.
Typical output is
| tarantool> box.info.replication[2].downstream
| ---
| - status: follow
| idle: 0.61753897101153
| vclock: {1: 147}
| lag: 0
| ...
| tarantool> box.space.sync:insert{69}
| ---
| - [69]
| ...
|
| tarantool> box.info.replication[2].downstream
| ---
| - status: follow
| idle: 0.75324084801832
| vclock: {1: 151}
| lag: 0.0011014938354492
| ...
Closes #5447
Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com>
@TarantoolBot document
Title: Add `box.info.replication[n].downstream.lag` entry
`replication[n].downstream.lag` represents a lag between the main
node writes a certain transaction to it's own WAL and a moment it
receives an ack for this transaction from a replica.
Showing
- changelogs/unreleased/gh-5447-downstream-lag.md 6 additions, 0 deletionschangelogs/unreleased/gh-5447-downstream-lag.md
- src/box/lua/info.c 3 additions, 0 deletionssrc/box/lua/info.c
- src/box/relay.cc 41 additions, 0 deletionssrc/box/relay.cc
- src/box/relay.h 6 additions, 0 deletionssrc/box/relay.h
- test/replication/gh-5447-downstream-lag.result 124 additions, 0 deletionstest/replication/gh-5447-downstream-lag.result
- test/replication/gh-5447-downstream-lag.test.lua 56 additions, 0 deletionstest/replication/gh-5447-downstream-lag.test.lua
- test/replication/suite.ini 1 addition, 1 deletiontest/replication/suite.ini
Loading