Skip to content
Snippets Groups Projects
Commit 519c4c3e authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

replication: add monitoring and fix crashes

Add replication status to box.info().
When replication is off, box.info.replication.status is 'off'.
Other allowed statuses are:
    - 'connecting' - trying to connect to the master
    - 'connected' - connected, but nothing read yet,
    - 'running' - successfully received first rows
    - 'failed' - network error
    - 'stopped' - apply conflict, replication needs to be restarted

Move recovery_last_update and recovery_delay to section 'replication'
in box.info(), replace the first with 'lag' variable, indicating
the time difference between the currnet time and row time of the last
row, and 'idle' variable, indicating the difference between the
current time and the time of last event from the master.

Also output the text of the last error when it happens and
stops replication.

Make vclock output in box.info more compact.

Remove 'sophia' section from box.info, it's big, and we need
to solve the problem of status systematically for all engines.

Fix crashes when trying to stop failed replication: fiber_cancel()
of a dead cancellable fiber would try to schedule it and crash.
parent b1b80202
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment