From: Serge Petrenko <sergepetrenko@tarantool.org> To: vdavydov.dev@gmail.com Cc: tarantool-patches@freelists.org, Serge Petrenko <sergepetrenko@tarantool.org> Subject: [PATCH] replication: fix exit with ER_NO_SUCH_USER during bootstrap Date: Thu, 23 Aug 2018 15:57:43 +0300 [thread overview] Message-ID: <20180823125743.56072-1-sergepetrenko@tarantool.org> (raw) When replication is configured via some user created in box.once() function and box.once() takes more than replication_timeout seconds to execute, appliers recieve ER_NO_SUCH_USER error, which they don't handle. This leads to occasional test failures in replication suite. Fix this by handling the aforementioned case in applier_f(). Closes #3637 --- https://github.com/tarantool/tarantool/issues/3637 https://github.com/tarantool/tarantool/tree/sp/gh-3637-replication-tests-fix src/box/applier.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/box/applier.cc b/src/box/applier.cc index dbb4d05f9..740778e80 100644 --- a/src/box/applier.cc +++ b/src/box/applier.cc @@ -607,6 +607,14 @@ applier_f(va_list ap) applier_log_error(applier, e); applier_disconnect(applier, APPLIER_DISCONNECTED); goto reconnect; + } else if (e->errcode() == ER_NO_SUCH_USER) { + /* + * Probably box.once() hasn't finished + * on bootstrap leader yet. + */ + applier_log_error(applier, e); + applier_disconnect(applier, APPLIER_DISCONNECTED); + goto reconnect; } else if (e->errcode() == ER_SYSTEM) { /* System error from master instance. */ applier_log_error(applier, e); -- 2.15.2 (Apple Git-101.1)
next reply other threads:[~2018-08-23 12:57 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-23 12:57 Serge Petrenko [this message] 2018-08-23 13:29 ` Vladimir Davydov
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=20180823125743.56072-1-sergepetrenko@tarantool.org \ --to=sergepetrenko@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [PATCH] replication: fix exit with ER_NO_SUCH_USER during bootstrap' \ /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