From: Vladimir Davydov <vdavydov.dev@gmail.com> To: Georgy Kirichenko <georgy@tarantool.org> Cc: tarantool-patches@freelists.org Subject: Re: [tarantool-patches] [PATCH v2 1/2] Do not promote wal vclock for failed writes Date: Fri, 8 Feb 2019 12:57:49 +0300 [thread overview] Message-ID: <20190208095749.wv7wwlzbrzuo2th4@esperanza> (raw) In-Reply-To: <79a9eeb9870e15a826d7e64f186b8010ad836a64.1549556742.git.georgy@tarantool.org> On Thu, Feb 07, 2019 at 08:27:30PM +0300, Georgy Kirichenko wrote: > diff --git a/test/box/errinj.result b/test/box/errinj.result > index 12303670e..1d9a16d8d 100644 > --- a/test/box/errinj.result > +++ b/test/box/errinj.result > @@ -141,6 +141,15 @@ errinj.set("ERRINJ_TESTING", false) > --- > - ok > ... > +env = require('test_run') > +--- > +... > +test_run = env.new() > +--- > +... > +lsn1 = box.info.vclock[box.info.id] > +--- > +... > -- Check how well we handle a failed log write > errinj.set("ERRINJ_WAL_IO", true) > --- > @@ -161,6 +170,11 @@ space:insert{1} > --- > - [1] > ... > +-- Check vclock was promoted only one time > +box.info.vclock[box.info.id] == lsn1 + 1 > +--- > +- true > +... > errinj.set("ERRINJ_WAL_IO", true) > --- > - ok > @@ -180,6 +194,15 @@ errinj.set("ERRINJ_WAL_IO", false) > --- > - ok > ... > +space:update(1, {{'=', 2, 2}}) > +--- > +- [1, 2] > +... > +-- Check vclock was promoted only two times > +box.info.vclock[box.info.id] == lsn1 + 2 > +--- > +- true > +... > space:truncate() > --- > ... You didn't sync box/errinj.result properly. To be exact, you synced it in the next patch. > diff --git a/test/box/errinj.test.lua b/test/box/errinj.test.lua > index 6f491d623..39d73b57e 100644 > --- a/test/box/errinj.test.lua > +++ b/test/box/errinj.test.lua > @@ -18,11 +18,31 @@ space:insert{1} > space:get{1} > errinj.set("ERRINJ_WAL_IO", false) > space:insert{1} > +-- Check vclock was promoted only one time Pointless change. > errinj.set("ERRINJ_WAL_IO", true) > space:update(1, {{'=', 2, 2}}) > space:get{1} > space:get{2} > errinj.set("ERRINJ_WAL_IO", false) > +space:update(1, {{'=', 2, 2}}) > +-- Check vclock was promoted only two times Pointless change. Please be more careful. I fixed those bloopers by myself. > +space:truncate() > + > +lsn1 = box.info.vclock[box.info.id] > +-- Check how well we handle a failed log write > +errinj.set("ERRINJ_WAL_WRITE_PARTIAL", 0) > +space:insert{1} > +errinj.set("ERRINJ_WAL_WRITE_PARTIAL", -1) > +space:insert{1} > +-- Check vclock was promoted only one time > +box.info.vclock[box.info.id] == lsn1 + 1 > +errinj.set("ERRINJ_WAL_WRITE_PARTIAL", 0) > +space:update(1, {{'=', 2, 2}}) > +space:get{1} > +errinj.set("ERRINJ_WAL_WRITE_PARTIAL", -1) > +space:update(1, {{'=', 2, 2}}) > +-- Check vclock was promoted only two times > +box.info.vclock[box.info.id] == lsn1 + 2 > space:truncate()
next prev parent reply other threads:[~2019-02-08 9:57 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-02-07 17:27 [tarantool-patches] [PATCH v2 0/2] Do not promote vclocks in case of failure Georgy Kirichenko 2019-02-07 17:27 ` [tarantool-patches] [PATCH v2 1/2] Do not promote wal vclock for failed writes Georgy Kirichenko 2019-02-08 9:57 ` Vladimir Davydov [this message] 2019-02-07 17:27 ` [tarantool-patches] [PATCH v2 2/2] Promote replicaset.vclock only after wal Georgy Kirichenko 2019-02-08 10:09 ` [tarantool-patches] [PATCH v2 0/2] Do not promote vclocks in case of failure 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=20190208095749.wv7wwlzbrzuo2th4@esperanza \ --to=vdavydov.dev@gmail.com \ --cc=georgy@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH v2 1/2] Do not promote wal vclock for failed writes' \ /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