Cyrill Gorcunov
authored
Applier fiber sends current vclock of the node to remote relay reader,
pointing current state of fetched WAL data so the relay will know which
new data should be sent. The packet applier sends carries xrow_header::tm
field as a zero but we can reuse it to provide information about first
timestamp in a transaction we wrote to our WAL. Since old instances of
Tarantool simply ignore this field such extension won't cause any
problems.
The timestamp will be needed to account lag of downstream replicas
suitable for information purpose and cluster health monitoring.
We update applier statistics in WAL callbacks but since both
apply_synchro_row and apply_plain_tx are used not only in real data
application but in final join stage as well (in this stage we're not
writing the data yet) the apply_synchro_row is extended with replica_id
argument which is non zero when applier is subscribed.
The calculation of the downstream lag itself lag will be addressed
in next patch because sending the timestamp and its observation
are independent actions.
Part-of #5447
Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com>
Name | Last commit | Last update |
---|