[tarantool-patches] Re: [PATCH] replication: display correct status at upstream

Konstantin Osipov kostja at tarantool.org
Sat Apr 28 23:30:36 MSK 2018


* Konstantin Belyavskiy <k.belyavskiy at tarantool.org> [18/04/27 13:43]:
> This fix improves 'box.info.replication' output.
> If downstream fails and thus disconnects from upstream, improve
> logging by printing 'status: disconnected'.
> Add relay_state { NONE, CONNECTED, DISCONNECTED } to track replica
> presence, once connected it either CONNECTED or DISCONNECTED until
> master is reset.
> 
> Closes #3365

Hi,

the patch is very good, almost ready to push, but I would like to
request  more work.

First, a very minor reason why I'm not pushing it right away is
that I believe relay states should be matched with applier states.

The matching applier states are OFF, FOLLOW and STOPPED. 
I think it would be easier for users if we don't invent new states
on relay side. 

Second, we allocate relay object on stack; this seems to be a historical
artifact, we have had struct relay before we got struct replica.
Relay has a diagnostics area, so by keeping the relay around we
will be able to display the last error in a way similar to
applier. 

I'm not talking about pushing the message back from the applier to
relay - this seems to be an unnecessary hassle and will complicate
things quite a bit.


-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov




More information about the Tarantool-patches mailing list