From: Serge Petrenko <sergepetrenko@tarantool.org> To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com, Serge Petrenko <sergepetrenko@tarantool.org> Subject: [PATCH] replication: fix a failing assert in replica_on_applier_disconnect() Date: Fri, 3 Aug 2018 08:59:05 +0300 [thread overview] Message-ID: <20180803055905.69108-1-sergepetrenko@tarantool.org> (raw) One possible case when two applier errors happen one after another wasn't handled in replica_on_applier_disconnect(), which lead to occasional test failures and crashes. Handle this case. Part of #3510 --- This patch fixes an assertion fail, submitted by @locker in issue comments. I wasn't able to reproduce 2 failures reported in the issue itself, and asked for comments, but got no answer. I also couldn't fix the latter 2 failures just by looking at code. https://github.com/tarantool/tarantool/tree/sergepetrenko/gh-3510-replication-asserts-fail https://github.com/tarantool/tarantool/issues/3510 src/box/replication.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/box/replication.cc b/src/box/replication.cc index 26bbbe32a..0efbd7c0e 100644 --- a/src/box/replication.cc +++ b/src/box/replication.cc @@ -350,6 +350,10 @@ replica_on_applier_disconnect(struct replica *replica) assert(replicaset.applier.connected > 0); replicaset.applier.connected--; break; + case APPLIER_LOADING: + assert(replicaset.applier.loading > 0); + replicaset.applier.loading--; + break; case APPLIER_DISCONNECTED: break; default: -- 2.15.2 (Apple Git-101.1)
next reply other threads:[~2018-08-03 5:59 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-03 5:59 Serge Petrenko [this message] 2018-08-03 15:43 ` Vladimir Davydov 2018-08-03 15:57 ` [tarantool-patches] " Kirill Yukhin 2018-08-06 14:14 ` Sergey Petrenko 2018-08-07 16:50 ` Vladimir Davydov 2018-08-08 10:10 ` Sergey Petrenko 2018-08-08 10:58 ` Vladimir Davydov 2018-08-08 15:19 ` Sergey Petrenko
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=20180803055905.69108-1-sergepetrenko@tarantool.org \ --to=sergepetrenko@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=vdavydov.dev@gmail.com \ --subject='Re: [PATCH] replication: fix a failing assert in replica_on_applier_disconnect()' \ /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