From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 9D6696FC8D; Sun, 24 Oct 2021 18:39:37 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9D6696FC8D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1635089977; bh=Wy0fGkDaCM8umyE7yUvsdNPjSYFuQKLKSF3vNkWmuG4=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=cueu/ERc7geuL1TZPwWWq4zfpUD4UbVA56wbM2dGPaW5TcJoSxvL7oKFs1pddFxW8 npNwiRTOxn8GUB5MwyseLsWyzDZX0HSovFV5l+QIB/mCNjDGq6rJEArROOhFlHAMv1 kuMrHpjL93wtZYY61RKx8eSd/0S8N9SPBmeApbLg= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 612056FC8D for ; Sun, 24 Oct 2021 18:39:36 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 612056FC8D Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1mefax-0004NG-NN; Sun, 24 Oct 2021 18:39:36 +0300 Message-ID: <31fa78f8-c01b-27be-83a8-8eb9119a837a@tarantool.org> Date: Sun, 24 Oct 2021 17:39:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Content-Language: en-US To: Cyrill Gorcunov Cc: tml References: <20211014215622.49732-1-gorcunov@gmail.com> <20211014215622.49732-4-gorcunov@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9C7814344C8C501C81DF2D982FCC3642A10B25E0CD3D2314B182A05F5380850402D822D9AF39FBB755E9EE156539C0B50E1D7211D5E4CA0C0E4BD1E541B8C5476 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7BB17EE3498E810FEEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006377845AD97F799C6E88638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8F4264B247ED58538CAC383C5F6ABB840117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8C7ADC89C2F0B2A5A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FF6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B953A8A48A05D51F175ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5958B7EC3DDB402C29AB54257F385837C58279ADA5651CE7ED59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75FA7FF33AA1A4D21C410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3455049D7B43D89D64558A7E986FC1B950BB8820A91A2A4F5A6B08241F7FFBCC668EAB26C0516FF9661D7E09C32AA3244C3096A5950B7EE7E59E2FDC4BDBCB918969B6CAE0477E908D729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj4h4hRfZzuFTLaTu/RMg5Kw== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D2AD8E1DEEAFA7C56E9C571601260F5A53841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v23 3/3] test: add gh-6036-qsync-order test X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" >> 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.