From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 65D044696C3 for ; Mon, 6 Apr 2020 10:40:17 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id q19so13482759ljp.9 for ; Mon, 06 Apr 2020 00:40:17 -0700 (PDT) Date: Mon, 6 Apr 2020 10:40:16 +0300 From: Konstantin Osipov Message-ID: <20200406074016.GB10993@atlas> References: <20200404161524.7466-1-gorcunov@gmail.com> <20200404161524.7466-6-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200404161524.7466-6-gorcunov@gmail.com> Subject: Re: [Tarantool-patches] [PATCH v11 5/8] box/replication: merge replica_by_id into replicaset List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tml * Cyrill Gorcunov [20/04/05 05:06]: > For some reason the replica_by_id member (which is an > array of pointers) is allocated dynamically. Moreover > VCLOCK_MAX = 32 by now and extending it to some new > limit will require a way more efforts than just increase > the number. > > Thus reserve memory for replica_by_id inside replicaset > statically. This allows to simplify code a bit and > drop calloc/free calls. > > The former code comes from edd76a2a0ae17e3d without any > explanation why the dynamic member is needed. lgtm -- Konstantin Osipov, Moscow, Russia