Tarantool development patches archive
 help / color / mirror / Atom feed
From: sergepetrenko <sergepetrenko@tarantool.org>
To: v.shpilevoy@tarantool.org, georgy@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v2 0/5] introduce anonymous replicas
Date: Wed, 25 Dec 2019 15:46:57 +0300	[thread overview]
Message-ID: <cover.1577277455.git.sergepetrenko@tarantool.org> (raw)

https://github.com/tarantool/tarantool/tree/sp/gh-3186-anon-replica
https://github.com/tarantool/tarantool/issues/3186

The first patch alters the comment regarding join protocol
to be in sync with latest changes: join isn't done off a snapshot,
but from a read-view rather, created at the moment the request is received.

The second patch removes unnecessary decoding of replicaset uuid on
master side, since master just ignores it now.

The third patch is a preparation for anonymous replica. We need to split join
protocol into two stages: first, fetch a snapshot. This is done by both anonymous
and regular replicas. The second stage is registration, i. e. the addition of
replica to _cluster table. It is done right away when joining a regular replica,
or it can be done by a request from an anonymous replica to transition it to
normal one.
The patch itself just splits applier join into appropriate stages.

The fourth patch modifies vclock logic to ignore 0 component in comparisons.
This is also used by anonymous replicas, which will be the first users of the 
0-th vclock component. This component will be used to keep track of anonymous
replica local changes, which are not replicated. These local changes will vary
from instance to instance, and the anonymous instances will all use 0th component
to track them, so no need to compare this component.

The fifth patch does the main job of adding anonymous replicas.
New requests, FETCH_SNAPSHOT and REGISTER are introduced. Anonymous replicas
are allowed to have a 0 id. They aren't registered as gc consumers and aren't
present in _cluster table.

Changes in v2: 
  - review fixes as per reviews from
    Georgy Kirichenko and Vlad Shpilevoy.

Serge Petrenko (5):
  box: update comment describing join protocol
  replication: do not decode replicaset uuid when processing a subscribe
  applier: split join processing into two stages
  vclock: ignore 0th component in comparisons.
  replication: introduce anonymous replica.

 src/box/applier.cc              | 124 ++++++++++--
 src/box/applier.h               |   4 +
 src/box/box.cc                  | 276 +++++++++++++++++++++++++--
 src/box/box.h                   |  11 +-
 src/box/errcode.h               |   1 +
 src/box/iproto.cc               |  16 +-
 src/box/iproto_constants.h      |   6 +
 src/box/lua/cfg.cc              |  14 +-
 src/box/lua/info.c              |   4 +-
 src/box/lua/load_cfg.lua        |   4 +
 src/box/recovery.cc             |   7 +-
 src/box/relay.cc                |  28 ++-
 src/box/replication.cc          |  41 +++-
 src/box/replication.h           |  24 +++
 src/box/vclock.h                |  12 +-
 src/box/wal.c                   |   4 +
 src/box/xrow.c                  |  49 ++++-
 src/box/xrow.h                  |  68 ++++++-
 test/app-tap/init_script.result |  49 ++---
 test/box/admin.result           |   2 +
 test/box/cfg.result             |   4 +
 test/box/misc.result            |   1 +
 test/replication/anon.lua       |  13 ++
 test/replication/anon.result    | 326 ++++++++++++++++++++++++++++++++
 test/replication/anon.test.lua  | 118 ++++++++++++
 test/replication/anon1.lua      |   1 +
 test/replication/anon2.lua      |   1 +
 test/replication/suite.cfg      |   1 +
 test/unit/vclock.cc             |   8 +-
 29 files changed, 1123 insertions(+), 94 deletions(-)
 create mode 100644 test/replication/anon.lua
 create mode 100644 test/replication/anon.result
 create mode 100644 test/replication/anon.test.lua
 create mode 120000 test/replication/anon1.lua
 create mode 120000 test/replication/anon2.lua

-- 
2.20.1 (Apple Git-117)

             reply	other threads:[~2019-12-25 12:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25 12:46 sergepetrenko [this message]
2019-12-25 12:46 ` [Tarantool-patches] [PATCH v2 1/5] box: update comment describing join protocol sergepetrenko
2019-12-25 12:46 ` [Tarantool-patches] [PATCH v2 2/5] replication: do not decode replicaset uuid when processing a subscribe sergepetrenko
2019-12-25 12:47 ` [Tarantool-patches] [PATCH v2 3/5] applier: split join processing into two stages sergepetrenko
2019-12-25 12:47 ` [Tarantool-patches] [PATCH v2 4/5] vclock: ignore 0th component in comparisons sergepetrenko
2019-12-25 16:00   ` Vladislav Shpilevoy
2019-12-27 18:42   ` Vladislav Shpilevoy
2019-12-28 11:21     ` Sergey Petrenko
2019-12-25 12:47 ` [Tarantool-patches] [PATCH v2 5/5] replication: introduce anonymous replica sergepetrenko
2019-12-25 18:22   ` Vladislav Shpilevoy
2019-12-27 15:27     ` Sergey Petrenko
2019-12-27 18:42       ` Vladislav Shpilevoy
2019-12-28 11:48         ` Sergey Petrenko
2019-12-28 12:15           ` Vladislav Shpilevoy
2019-12-30  5:12 ` [Tarantool-patches] [PATCH v2 0/5] introduce anonymous replicas Kirill Yukhin

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=cover.1577277455.git.sergepetrenko@tarantool.org \
    --to=sergepetrenko@tarantool.org \
    --cc=georgy@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 0/5] 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