From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) (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 24439442BB7 for ; Sun, 22 Mar 2020 08:08:05 +0300 (MSK) From: Oleg Babin References: Message-ID: <1f571d45-179d-1b72-941d-3de21c2e8f11@tarantool.org> Date: Sun, 22 Mar 2020 08:08:04 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH vshard 2/2] storage: introduce vshard.storage._call() List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy , tarantool-patches@dev.tarantool.org, yaroslav.dynnikov@tarantool.org Thanks for your patch! See comments bellow. On 21/03/2020 21:59, Vladislav Shpilevoy wrote: > _call can't be properly integrated at this moment, because that > would break rebalancing from old nodes. The new function is only > added. Its usage and drop of old functions will happen in 0.1.17 > when I will finish and merge top commit from this branch: > https://github.com/tarantool/vshard/tree/gerold103/gh-227-drop-old-functions Could you add some "smoke" tests for "_call" function? The test in this patch only checks that it exists but don't check that it works. If it's hard and non-trivial ignore this comment. > > +local service_call_api = { > + bucket_recv = bucket_recv, > + rebalancer_apply_routes = rebalancer_apply_routes, > + rebalancer_request_state = rebalancer_request_state, > +} > + > +local function service_call(...) > + local service_name = select(1, ...) > + return service_call_api[service_name](select(2, ...)) > +end What's about checking that "service_call_api[service_name]" exists?