From: Sergey Petrenko via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>, gorcunov@gmail.com Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH v4 12/16] box: fix an assertion failure after a spurious wakeup in promote Date: Fri, 23 Jul 2021 09:45:22 +0200 [thread overview] Message-ID: <4f192cbf-5bad-4eb7-9ed0-2789d5d4c7d8@tarantool.org> (raw) In-Reply-To: <a08b0288-33f2-122a-6389-26b3bb3c8921@tarantool.org> 22.07.2021 01:29, Vladislav Shpilevoy пишет: > I appreciate the work you did here! > > See 2 comments below. > >> diff --git a/test/replication/gh-3055-promote-wakeup-crash.result b/test/replication/gh-3055-promote-wakeup-crash.result >> new file mode 100644 >> index 000000000..e508611e5 >> --- /dev/null >> +++ b/test/replication/gh-3055-promote-wakeup-crash.result >> @@ -0,0 +1,43 @@ >> +-- test-run result file version 2 >> +test_run = require('test_run').new() >> + | --- >> + | ... >> +-- >> +-- gh-3055 follow-up: box.ctl.promote() could crash on an assertion after a >> +-- spurious wakeup. >> +-- >> +_ = box.space._cluster:insert{2, require('uuid').str()} >> + | --- >> + | ... >> +box.cfg{election_mode='manual',\ >> + replication_synchro_quorum=2,\ >> + election_timeout=1000} > 1. Shouldn't you save and restore the old option values in the end > of the test? Not anymore. As far as I know the default instance is restarted between each test run now. So we only need to reset persistent things now, like grants, roles, promotes/demotes, spaces and so on. >> + | --- >> + | ... >> + >> +fiber = require('fiber') >> + | --- >> + | ... >> +f = fiber.create(function() box.ctl.promote() end) >> + | --- >> + | ... >> +f:set_joinable(true) > 2. But you never use :join(). Perhaps you might want to call it > after :cancel(). To ensure the fiber really ended. Yep, my bad. Thanks for noticing! ===================================== diff --git a/test/replication/gh-3055-promote-wakeup-crash.result b/test/replication/gh-3055-promote-wakeup-crash.result index e508611e5..f915bf359 100644 --- a/test/replication/gh-3055-promote-wakeup-crash.result +++ b/test/replication/gh-3055-promote-wakeup-crash.result @@ -35,6 +35,11 @@ fiber.yield() f:cancel() | --- | ... +f:join() + | --- + | - false + | - fiber is cancelled + | ... box.cfg{election_mode='off'} | --- | ... diff --git a/test/replication/gh-3055-promote-wakeup-crash.test.lua b/test/replication/gh-3055-promote-wakeup-crash.test.lua index 2ac901b08..acf0c05b0 100644 --- a/test/replication/gh-3055-promote-wakeup-crash.test.lua +++ b/test/replication/gh-3055-promote-wakeup-crash.test.lua @@ -16,5 +16,6 @@ fiber.yield() -- Cleanup. f:cancel() +f:join() box.cfg{election_mode='off'} test_run:cleanup_cluster() ===================================== >> + | --- >> + | ... >> +f:wakeup() >> + | --- >> + | ... >> +fiber.yield() >> + | --- >> + | ... >> + >> +-- Cleanup. >> +f:cancel() >> + | --- >> + | ... >> +box.cfg{election_mode='off'} >> + | --- >> + | ... >> +test_run:cleanup_cluster() >> + | --- >> + | ...
next prev parent reply other threads:[~2021-07-23 7:47 UTC|newest] Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-14 18:25 [Tarantool-patches] [PATCH v4 00/16] forbid implicit limbo ownership transition Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 01/16] replication: always send raft state to subscribers Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 02/16] txn_limbo: fix promote term filtering Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 03/16] txn_limbo: persist the latest effective promote in snapshot Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 04/16] replication: encode version in JOIN request Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 05/16] replication: add META stage to JOIN Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 06/16] replication: send latest effective promote in initial join Serge Petrenko via Tarantool-patches 2021-07-21 23:24 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-23 7:44 ` Sergey Petrenko via Tarantool-patches 2021-07-26 23:43 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 07/16] replication: send current Raft term in join response Serge Petrenko via Tarantool-patches 2021-07-21 23:24 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-23 7:44 ` Sergey Petrenko via Tarantool-patches 2021-07-26 23:43 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-29 20:46 ` Sergey Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 08/16] raft: refactor raft_new_term() Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 09/16] box: split promote() into reasonable parts Serge Petrenko via Tarantool-patches 2021-07-21 23:26 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-23 7:45 ` Sergey Petrenko via Tarantool-patches 2021-07-26 23:44 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-29 20:46 ` Sergey Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 10/16] box: make promote always bump the term Serge Petrenko via Tarantool-patches 2021-07-26 23:45 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-29 20:46 ` Sergey Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 11/16] box: make promote on the current leader a no-op Serge Petrenko via Tarantool-patches 2021-07-21 23:26 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-23 7:45 ` Sergey Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 12/16] box: fix an assertion failure after a spurious wakeup in promote Serge Petrenko via Tarantool-patches 2021-07-21 23:29 ` Vladislav Shpilevoy via Tarantool-patches 2021-07-23 7:45 ` Sergey Petrenko via Tarantool-patches [this message] 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 13/16] box: allow calling promote on a candidate Serge Petrenko via Tarantool-patches 2021-07-15 14:06 ` Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 14/16] box: extract promote() settings to a separate method Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 15/16] replication: forbid implicit limbo owner transition Serge Petrenko via Tarantool-patches 2021-07-14 18:25 ` [Tarantool-patches] [PATCH v4 16/16] box: introduce `box.ctl.demote` Serge Petrenko via Tarantool-patches 2021-07-15 17:13 ` Serge Petrenko via Tarantool-patches 2021-07-15 20:11 ` [Tarantool-patches] [PATCH v4 17/16] replication: fix flaky election_qsync.test Serge Petrenko via Tarantool-patches 2021-07-26 23:43 ` [Tarantool-patches] [PATCH v4 00/16] forbid implicit limbo ownership transition Vladislav Shpilevoy via Tarantool-patches 2021-07-29 20:47 ` Sergey Petrenko via Tarantool-patches
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=4f192cbf-5bad-4eb7-9ed0-2789d5d4c7d8@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=gorcunov@gmail.com \ --cc=sergepetrenko@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v4 12/16] box: fix an assertion failure after a spurious wakeup in promote' \ /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