From: "Konstantin Belyavskiy" <k.belyavskiy@tarantool.org>
To: "Konstantin Osipov" <kostja@tarantool.org>,
georgy <georgy@tarantool.org>
Cc: tarantool-patches <tarantool-patches@freelists.org>
Subject: [tarantool-patches] Re: [tarantool-patches] Re: [PATCH] replication: display correct status at upstream
Date: Fri, 04 May 2018 17:09:12 +0300 [thread overview]
Message-ID: <1525442951.810874464@f501.i.mail.ru> (raw)
In-Reply-To: <20180428203036.GA4857@atlas>
[-- Attachment #1: Type: text/plain, Size: 1988 bytes --]
Ok, so we can keep relay state and get last error from it.
For example in case of disconnect (broken pipe) we got SocketError
and in case of LSN gap, XlogGapError.
So for diagnostic if state is STOPPED just print last error from relay.
So changes to do:
1. Align relay state to match applier state (OFF, FOLLOW and STOPPED).
2. Do not destroy relay on error.
3. To simplify diagnostic, box.info.replication print last error if STOPPED.
Kostya, Georgy are you OK?
>Суббота, 28 апреля 2018, 23:30 +03:00 от Konstantin Osipov <kostja@tarantool.org>:
>
>* Konstantin Belyavskiy < k.belyavskiy@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
>
Best regards,
Konstantin Belyavskiy
k.belyavskiy@tarantool.org
[-- Attachment #2: Type: text/html, Size: 2878 bytes --]
prev parent reply other threads:[~2018-05-04 14:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 10:39 [tarantool-patches] " Konstantin Belyavskiy
2018-04-28 20:30 ` [tarantool-patches] " Konstantin Osipov
2018-04-28 20:45 ` Konstantin Osipov
2018-05-04 14:09 ` Konstantin Belyavskiy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1525442951.810874464@f501.i.mail.ru \
--to=k.belyavskiy@tarantool.org \
--cc=georgy@tarantool.org \
--cc=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [tarantool-patches] Re: [PATCH] replication: display correct status at upstream' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox