From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 15 Oct 2018 11:26:03 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] [PATCH] [replication] introduce anonymous replicas. Message-ID: <20181015082603.7aubqz27rzvgx2tr@esperanza> References: <20181013165449.29849-1-sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181013165449.29849-1-sergepetrenko@tarantool.org> To: Serge Petrenko Cc: georgy@tarantool.org, tarantool-patches@freelists.org List-ID: On Sat, Oct 13, 2018 at 07:54:49PM +0300, Serge Petrenko wrote: > This patch makes it possible for a replica to join/subscribe > anonymously, i.e. without being added to the _cluster table. > This allows to have more than VCLOCK_MAX (currently 32) replicas in a > replicaset, with a condition that some of them must be read only. > > This is achieved by introducing a new field to JOIN/SUBSCRIBE > requests: IPROTO_REPLICA_ANON. Upon recieving a request with the option > set to true, master adds the newly connected replica to a replica hash, > but does not register it in _cluster table and does not assign an id to > it. The replica still appears in `box.info.replication` with > 'anonymous` parameter set to true. > To make replica send 'anonymous' JOIN/SUBSCRIBE requests, a new config > option is introduced: `replica_anon`. It may only be set to true > together with `read_only`. > > Closes #3186 IMO the feature design hasn't been elaborated so it's too early to look at the code. Pending questions: - What's the use case? What would one need an anonymous replica for? Can I turn it into a normal replica? Master? Read-write? What happens if I try? - How does the feature interact with replica-local spaces, which bypass box.cfg.read_only check? - Are anonymous replicas registered with the garbage collector on the master? If yes, can we unregister them? Normal replicas can be dropped by removing the corresponding entry from _cluster space. With anonymous replica it's impossible by design.