[Tarantool-patches] [PATCH vshard 0/6] Master discovery

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Jul 2 01:09:30 MSK 2021


The patchset implements master discovery for the router using polling in a
separate fiber + a hint from the storage when it rejects an RW request due to
being not a master.

The solution with subscriptions wasn't done due to architectural issues of
box.session.push() on the storage making it too expensive to use both on the
client and on the storage when number of connections is big.

Branch: http://github.com/tarantool/vshard/tree/gerold103/gh-75-master-discovery
Issue: https://github.com/tarantool/vshard/issues/75

Vladislav Shpilevoy (6):
  replicaset: introduce netbox_wait_connected()
  test: sort some table prints
  storage: introduce vshard.storage._call('info')
  config: introduce master 'auto' replicaset option
  router: introduce automatic master discovery
  router: update master using a hint from storage

 test/router/master_discovery.result   | 941 ++++++++++++++++++++++++++
 test/router/master_discovery.test.lua | 439 ++++++++++++
 test/router/router.result             |  36 +-
 test/router/router.test.lua           |   2 +
 test/storage/storage.result           |  14 +
 test/storage/storage.test.lua         |   7 +
 test/unit/config.result               |  48 ++
 test/unit/config.test.lua             |  21 +
 test/upgrade/upgrade.result           |  15 +-
 vshard/cfg.lua                        |  27 +-
 vshard/consts.lua                     |   5 +
 vshard/error.lua                      |   7 +-
 vshard/replicaset.lua                 | 326 +++++++--
 vshard/router/init.lua                | 115 +++-
 vshard/storage/init.lua               |  16 +-
 15 files changed, 1939 insertions(+), 80 deletions(-)
 create mode 100644 test/router/master_discovery.result
 create mode 100644 test/router/master_discovery.test.lua

-- 
2.24.3 (Apple Git-128)



More information about the Tarantool-patches mailing list