From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 E37A24696C3 for ; Thu, 2 Apr 2020 16:47:45 +0300 (MSK) Received: by mail-lj1-f173.google.com with SMTP id f20so3338685ljm.0 for ; Thu, 02 Apr 2020 06:47:45 -0700 (PDT) Date: Thu, 2 Apr 2020 16:47:43 +0300 From: Konstantin Osipov Message-ID: <20200402134743.GB30577@atlas> References: <20200402132948.12804-1-arkholga@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200402132948.12804-1-arkholga@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH rfc 0/1] replication: stop resetting existing connections List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Olga Arkhangelskaia Cc: tarantool-patches@dev.tarantool.org * Olga Arkhangelskaia [20/04/02 16:30]: Could you please explain the idea of the patch? As far I can see, you do some strcmp magic to understand if the uri is the same. Why not use instance uuids? 0) Introduce uuid -> applier hash. 1) Create new appliers for all entries in replication. 2) Establish connections, but do not issue SUBSCRIBE yet. 3) Look at connection server uuids. If this uuid is already connected to, then (easy) quietly close the new connection, and add existing connection to the new instance of uuid hash. 4) Add the new connection to the new instance of uuid hash. If there is a duplicate in the *new* instance of the uuid hash, produce "duplicate connection" error. Otherwise remove/delete all appliers that are left in the old uuid hash. Perhaps we need applier reference counting to make this work smoothly. -- Konstantin Osipov, Moscow, Russia https://scylladb.com