From: Georgy Kirichenko <georgy@tarantool.org> To: tarantool-patches@freelists.org Cc: Ilya Markov <imarkov@tarantool.org> Subject: [tarantool-patches] Re: [replication 1/1] replication: Introduce anonymous replicas Date: Fri, 04 May 2018 09:45:58 +0300 [thread overview] Message-ID: <2933481.OYFXySxWCs@home.lan> (raw) In-Reply-To: <cda1f10871ced6f147bbb657b51c870b2d31c433.1524908900.git.imarkov@tarantool.org> [-- Attachment #1: Type: text/plain, Size: 1587 bytes --] One case still does not working for me, reproduced with: 1. Create a master 2. Attach an anonymous replica 3. Shutdown a replica 4. Restart master 5. Startup a replica -> will fail with ER_UNKNOWN_REPLICA Also it should be fine to remove anonymous replicas when disconnected. For this case replica id assignment should be adjusted to (fill a holes between anonymous replicas ids). But we should do it in a separate patch. On Saturday, April 28, 2018 12:50:52 PM MSK Ilya Markov wrote: > Introduce anonymous replicas - replicas, info about which is not stored > in space _cluster, so their info is not replicated. > > Info about these replicas is stored only in runtime data structure on > the master node. > > Closes #3340 .. > @@ -1250,16 +1262,23 @@ box_on_join(const tt_uuid *instance_uuid) > struct iterator *it = index_create_iterator_xc(index, ITER_ALL, > NULL, 0); > IteratorGuard iter_guard(it); > - struct tuple *tuple; > /** Assign a new replica id. */ > uint32_t replica_id = 1; > - while ((tuple = iterator_next_xc(it)) != NULL) { > - if (tuple_field_u32_xc(tuple, > - BOX_CLUSTER_FIELD_ID) != replica_id) > - break; Previously iteration stopped on replica ids holes (e.g. for replica ids 1, 2, 4 the cycle returns 3 as a new replica id). This case is possible through manually cleaning of a _cluster space. I think old behavior should be preserved. > - replica_id++; > + > + replicaset_foreach(replica) { > + if (replica->id != REPLICA_ID_NIL && anonymous > + == replica->anonymous) > + replica_id++; > + } [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2018-05-04 6:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <1728544.W9Itg1czF0@home.lan> 2018-04-28 9:50 ` [tarantool-patches] " Ilya Markov 2018-05-04 6:45 ` Georgy Kirichenko [this message] 2018-05-04 10:45 ` Ilya Markov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=2933481.OYFXySxWCs@home.lan \ --to=georgy@tarantool.org \ --cc=imarkov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [replication 1/1] replication: Introduce anonymous replicas' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox