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 C7E506C7D2; Thu, 25 Feb 2021 15:43:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C7E506C7D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614257027; bh=XVihRSvEGt7NWyMdRpaJto595vBFvfGDcfeiaOcDE58=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=oEyaYze4Zp7KTXAuFZXgi9z9hrxaP0Mb6zRhabXVuNXqB0WkIe3I6R3OXLHJhU38l eD/c8m+3IikRpIcDJC8BKBL9jC7Joy+zu4pgwaljd7PLRoT9P3a2b2h1M80Twr14dB x3HL/gIhUVDnJvcLkNJYGpAs9j0nsDRhiKvaasjE= Received: from smtp44.i.mail.ru (smtp44.i.mail.ru [94.100.177.104]) (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 E4CDA71859 for ; Thu, 25 Feb 2021 15:42:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org E4CDA71859 Received: by smtp44.i.mail.ru with esmtpa (envelope-from ) id 1lFFyj-0005jJ-29; Thu, 25 Feb 2021 15:42:49 +0300 To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, yaroslav.dynnikov@tarantool.org References: <7a39f441-b33d-0aaf-2135-fb09c3130b3c@tarantool.org> Message-ID: Date: Thu, 25 Feb 2021 15:42:48 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD975C3EC174F5669228C980786C9DBA186ED94931C77F7596E182A05F5380850407497EAE843B75467864D7205E0D2A9E09971C2203C9421D86FA2F9F801AD3894 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE789066434B85BF7C7EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DEEC83A7CF8598608638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCDF5726CFBCA3E220679B28CC9926865BF57F5061AAD4E649389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C07E7E81EEA8A9722B8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B65FF0BFC5AEE34BE6CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C22495C137F56075BEB0576E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8B00E7B751CB18BCB13AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE73349F3DFB73D9B1167F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C355467760A4ED155135872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C9DE2850DD75B2526BE5BFE6E7EFDEDCD789D4C264860C145E X-C1DE0DAB: 0D63561A33F958A537E0293583756429567DD7A3CA7810BE0306D70F620875E1D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7557E988E9157162368E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3435B1F14A93C4073FDC00C302E72924903B98A121C40B030B2CDBD73DFFAB013C12B83B3ECA1422D51D7E09C32AA3244C51DA0FBDD9EC3A41DA15A9AF8EF1C4DC5595C85A795C7BAEFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojvz1c9SWJtj/1nES5QRjudw== X-Mailru-Sender: 583F1D7ACE8F49BD9317CE1922F30C7EF16E690E657590EA986D07A41750D4B013232A9A0118815C23E75C7104EB1B885DEE61814008E47C7013064206BFB89F93956FB04BA385BE9437F6177E88F7363CDA0F3B3F5B9367 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH vshard 09/11] ref: introduce vshard.storage.ref module 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: Oleg Babin via Tarantool-patches Reply-To: Oleg Babin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for your answers. On 25.02.2021 00:49, Vladislav Shpilevoy wrote: > Thanks for the review! > > On 24.02.2021 11:28, Oleg Babin wrote: >> Thanks for you patch. It's a brief review - I hope I'll look once again on this patch. >> >> Consider a question below. > A huge request - could you please remove the irrelevant parts of > the original emails from your responses? I need to scroll tons of > text to find your commets, and can accidentally miss some. > > Or at least provide some markers I could grep and jump to quickly. No problem. I'll remove irrelevant parts. >>> diff --git a/vshard/storage/CMakeLists.txt b/vshard/storage/CMakeLists.txt >>> index 3f4ed43..7c1e97d 100644 >>> --- a/vshard/storage/CMakeLists.txt >>> +++ b/vshard/storage/CMakeLists.txt >>> @@ -1,2 +1,2 @@ >>> -install(FILES init.lua reload_evolution.lua >>> +install(FILES init.lua reload_evolution.lua ref.lua >>>           DESTINATION ${TARANTOOL_INSTALL_LUADIR}/vshard/storage) >>> diff --git a/vshard/storage/init.lua b/vshard/storage/init.lua >>> index c3ed236..2957f48 100644 >>> --- a/vshard/storage/init.lua >>> +++ b/vshard/storage/init.lua >>> @@ -1140,6 +1142,9 @@ local function bucket_recv_xc(bucket_id, from, data, opts) >>>               return nil, lerror.vshard(lerror.code.WRONG_BUCKET, bucket_id, msg, >>>                                         from) >>>           end >>> +        if lref.count > 0 then >>> +            return nil, lerror.vshard(lerror.code.STORAGE_IS_REFERENCED) >>> +        end >> You will remove this part in the next patch. Do you really need it? Or you add it just for tests? > For the tests and for making the patch atomic. So as it wouldn't depend on the next > patch. > Ok. Thanks for your explanation. >>>           if is_this_replicaset_locked() then >>>               return nil, lerror.vshard(lerror.code.REPLICASET_IS_LOCKED) >>>           end >>> @@ -1441,6 +1446,9 @@ local function bucket_send_xc(bucket_id, destination, opts, exception_guard) >>>         local _bucket = box.space._bucket >>>       local bucket = _bucket:get({bucket_id}) >>> +    if lref.count > 0 then >>> +        return nil, lerror.vshard(lerror.code.STORAGE_IS_REFERENCED) >>> +    end >> Ditto.