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 2FB297030F; Thu, 25 Feb 2021 00:49:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 2FB297030F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614203385; bh=eaSKBIz4UvUPQMnLcR7isu3f3RmL2bvpM/i0FCOtqXQ=; 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=YK63xq8Oe7qRV3w8xQQF+BkRNgdashYMZeFSi16XFqQBXSHZ6S529o+W7zTlCbx6T SXS591kSsxrbA7Nntcf/KSy3oQ5VIbe95wP9UXWqIa/rqdAfQVc+u0w7O825zYqCZO axIjSJobL2nZHjg77uPqdFjCEfAZu/x/7gN2SM0s= Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 915CF7030F for ; Thu, 25 Feb 2021 00:49:43 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 915CF7030F Received: by smtp50.i.mail.ru with esmtpa (envelope-from ) id 1lF22Q-0003G4-Gq; Thu, 25 Feb 2021 00:49:43 +0300 To: Oleg Babin , tarantool-patches@dev.tarantool.org, yaroslav.dynnikov@tarantool.org References: <7a39f441-b33d-0aaf-2135-fb09c3130b3c@tarantool.org> Message-ID: Date: Wed, 24 Feb 2021 22:49:41 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <7a39f441-b33d-0aaf-2135-fb09c3130b3c@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD975C3EC174F56692243410BA6471F01668A37AB103014B813182A05F538085040EB4383E6BACE5A9C53967D62D8E41A625B699822EC034E269D2F8507F77F2E96 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE716FAD50E497B9C14EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637DEEC83A7CF8598608638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCEF6CC647C0669FAFD73D400E6C1D0AAFB09ADACEC1F1BAC5389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0D9442B0B5983000E8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B601F8F2FECC0250C8CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249B44394679E820ADE76E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8B74DB6DC5951DC5F93AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE7B2B7C64F398C741067F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C360781E301B93023135872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C9AE7E30DF62CE24E4E5BFE6E7EFDEDCD789D4C264860C145E X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A24A6D60772A99906F8E1CD14B953EB46D4A4DC23CA75012E3355D89D7DBCDD132 X-C1DE0DAB: 0D63561A33F958A51E72E67D502904ED63354A52B7DE2B527DEC41D665009C46D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75968C9853642EB7C3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34A150564C13026C18838ED3EC4086DCD83AE744AA698F8B7EE43EE1E3F09126E23B404A47E709EF2A1D7E09C32AA3244C42AAB13A2CE297DDC72CC8190CCBAC14435BF7150578642FFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojvz1c9SWJtj/QRc891Dt8sA== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA3110693A3518FBB8F81A175636B2DAE6CA31B9FDA50507DC254E07784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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. >> 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. >>           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.