[Tarantool-patches] [PATCH v23 3/3] test: add gh-6036-qsync-order test

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Sun Oct 24 18:39:34 MSK 2021


>> 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.

Sorry, but how is my comment above related to filtering? You introduced
some code which is dead - it is not tested at all. That was my only
point here.

It is not related to filtering - the ordering issue is separate as
you yourself noted when this was all a single patchset with the
split-brain detection. This is even proved by the test you added
here. I just need more tests for the other places which use the locking
now.

>> 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.

Well, the only thing which I am worrying right now about is that if this
person in a few years will drop almost the entirety of your patchset
wondering whether it is needed really, all the tests will pass.

Also you seem to misunderstand my proposal. I didn't propose to make less
locking, I only proposed to increase it. I thought it will be easier to do
with full blocking of certain functions because it might be just easier to
get something locked in the tests. The bigger the critical section is - the
easier to hit it. Or maybe fine-grained locking works better if you say so.
Don't know.

It will only affect performance. Perf of qsync/raft now is 0, because
it is not used at all, due to being unsafe. Because of the reordering and
of the split-brain. This patch can't say it makes the reordering stuff much
better, because there are no tests except for a single case of reordering.

If from my diff you understood that I proposed to this drop code - sorry,
I didn't mean this. I meant that your patch should test these places, not
drop them. By commenting this code out I tried to prove that this code is
dead now, and that it shouldn't be so.


More information about the Tarantool-patches mailing list