Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: tml <tarantool-patches@dev.tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v23 3/3] test: add gh-6036-qsync-order test
Date: Sat, 23 Oct 2021 01:03:06 +0300	[thread overview]
Message-ID: <YXM1GtxA6Xb0kGWV@grain> (raw)
In-Reply-To: <e7ff082d-31af-285f-d13f-508dac3e5f91@tarantool.org>

On Fri, Oct 22, 2021 at 12:06:09AM +0200, Vladislav Shpilevoy wrote:
> > + | ...
> > +test_run:wait_cond(function() return box.error.injection.get("ERRINJ_WAL_WRITE_COUNT") > write_cnt end)
> 
> Sorry, keep the code inside of 80 symbols line width.

OK

> 
> I added this diff and all the tests passed. That means the only
> tested parts of the patchset are apply_synchro_row() and
> txn_limbo_is_replica_outdated().
> 

Without the rest of locking the overall picture becomes incomplete,
we introduce the first part of split brain detection. And in second
part we'are about to introduce filtering into begin()/commit() pair.

> Please, lets try not to submit more untested code. It is enough that
> we already have one ticket which simply adds assert(false) into a few
> places and the tests pass. It does not make the code better, it just
> adds more uncertainty how it works and whether it works at all.

This is the correct way to guard access to some particular data to me.
In this case we're guarding @promote_term_map and @promote_greatest_term.
What you propose is to guard them in "some path" but leave untouched for
all others. So the person which would read this code after some years
gonna be scratching a head trying to figure out why sometimes access to
these members is done locked and somtimes are not. I completely disagree
here. Either we lock all accesses either not, not partial lockings please.

  reply	other threads:[~2021-10-22 22:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 21:56 [Tarantool-patches] [PATCH v23 0/3] qsync: implement packet filtering (part 1) Cyrill Gorcunov via Tarantool-patches
2021-10-14 21:56 ` [Tarantool-patches] [PATCH v23 1/3] latch: add latch_is_locked helper Cyrill Gorcunov via Tarantool-patches
2021-10-14 21:56 ` [Tarantool-patches] [PATCH v23 2/3] qsync: order access to the limbo terms Cyrill Gorcunov via Tarantool-patches
2021-10-21 22:06   ` Vladislav Shpilevoy via Tarantool-patches
2021-10-14 21:56 ` [Tarantool-patches] [PATCH v23 3/3] test: add gh-6036-qsync-order test Cyrill Gorcunov via Tarantool-patches
2021-10-19 15:09   ` Serge Petrenko via Tarantool-patches
2021-10-19 22:26     ` Cyrill Gorcunov via Tarantool-patches
2021-10-20  6:35       ` Serge Petrenko via Tarantool-patches
2021-10-21 22:06         ` Vladislav Shpilevoy via Tarantool-patches
2021-10-22  6:36           ` Serge Petrenko via Tarantool-patches
2021-10-21 22:06   ` Vladislav Shpilevoy via Tarantool-patches
2021-10-22 22:03     ` Cyrill Gorcunov via Tarantool-patches [this message]
2021-10-24 15:39       ` Vladislav Shpilevoy via Tarantool-patches
2021-10-24 16:01         ` Cyrill Gorcunov 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=YXM1GtxA6Xb0kGWV@grain \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=gorcunov@gmail.com \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v23 3/3] test: add gh-6036-qsync-order test' \
    /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