Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH vshard 0/7] Replicaset lock and bucket pin
@ 2018-03-27 21:24 Vladislav Shpilevoy
  2018-03-27 21:24 ` [tarantool-patches] [PATCH vshard 1/7] rebalancer: allow to lock a replicaset from rebalancing Vladislav Shpilevoy
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Vladislav Shpilevoy @ 2018-03-27 21:24 UTC (permalink / raw)
  To: tarantool-patches; +Cc: georgy, Vladislav Shpilevoy

Branch: http://github.com/tarantool/tarantool/tree/gh-71-bucket-pin-lock
Issue: https://github.com/tarantool/vshard/issues/71

Replicaset lock makes it invisible for the rebalancer - a locked
replicaset can neither receive new buckets nor send its own.
Bucket pin blocks this concrete bucket sending - it will stay on a
replicaset to which pinned, until it is unpinned. Pinning all
replicaset buckets is not the same as replicaset locking - even if
you pin all buckets, the non-locked replicaset still can receive
new buckets.

Replicaset lock allows, for example, to separate a replicaset for
testsing from production replicasets. Or to preserve some
application metadata, that must not be sharded for a while. Bucket
pin allows the same, but in the smaller scope.

Difference between replicaset lock and all buckets pinning is
motivated by ability to button-up an entire replicaset.

Mostly locked and pinned buckets affect the rebalancing algorithm,
which must ignore locked replicasets, and take pinned buckets into
account, attempting to reach the best possible balance. It is not
a trivial task, because a user can pin to a replicaset so many
buckets, that a perfect balance is unreachable.

Vladislav Shpilevoy (7):
  rebalancer: allow to lock a replicaset from rebalancing
  rebalancer: remember the currently sending bucket id
  storage: rework recovery
  storage: wrap bucket status checks into functions
  rebalancer: introduce pinned bucket concept into rebalancer algo
  storage: open public API to pin/unpin buckets
  rfc: add RFC for replicaset lock and bucket pin

 docs/RFC/replicaset_lock_and_bucket.md            |  84 ++++
 test/rebalancer/box_1_a.lua                       |   2 +-
 test/rebalancer/rebalancer_lock_and_pin.result    | 503 ++++++++++++++++++++++
 test/rebalancer/rebalancer_lock_and_pin.test.lua  | 224 ++++++++++
 test/rebalancer/restart_during_rebalancing.result |   4 +
 test/storage/recovery.result                      |  85 +++-
 test/storage/recovery.test.lua                    |  38 +-
 test/storage/storage.result                       |   7 +
 test/unit/rebalancer.result                       | 333 +++++++++++++-
 test/unit/rebalancer.test.lua                     |  79 ++++
 vshard/cfg.lua                                    |   3 +-
 vshard/consts.lua                                 |   1 +
 vshard/error.lua                                  |  12 +-
 vshard/replicaset.lua                             | 105 +++--
 vshard/router/init.lua                            |  46 +-
 vshard/storage/init.lua                           | 418 +++++++++++-------
 16 files changed, 1713 insertions(+), 231 deletions(-)
 create mode 100644 docs/RFC/replicaset_lock_and_bucket.md
 create mode 100644 test/rebalancer/rebalancer_lock_and_pin.result
 create mode 100644 test/rebalancer/rebalancer_lock_and_pin.test.lua

-- 
2.14.3 (Apple Git-98)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-30  4:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-27 21:24 [tarantool-patches] [PATCH vshard 0/7] Replicaset lock and bucket pin Vladislav Shpilevoy
2018-03-27 21:24 ` [tarantool-patches] [PATCH vshard 1/7] rebalancer: allow to lock a replicaset from rebalancing Vladislav Shpilevoy
2018-03-27 21:24 ` [tarantool-patches] [PATCH vshard 2/7] rebalancer: remember the currently sending bucket id Vladislav Shpilevoy
2018-03-27 21:24 ` [tarantool-patches] [PATCH vshard 3/7] storage: rework recovery Vladislav Shpilevoy
2018-03-27 21:24 ` [tarantool-patches] [PATCH vshard 4/7] storage: wrap bucket status checks into functions Vladislav Shpilevoy
2018-03-27 21:24 ` [tarantool-patches] [PATCH vshard 5/7] rebalancer: introduce pinned bucket concept into rebalancer algo Vladislav Shpilevoy
2018-03-27 21:24 ` [tarantool-patches] [PATCH vshard 6/7] storage: open public API to pin/unpin buckets Vladislav Shpilevoy
2018-03-27 21:24 ` [tarantool-patches] [PATCH vshard 7/7] rfc: add RFC for replicaset lock and bucket pin Vladislav Shpilevoy
2018-03-30  4:15 ` [tarantool-patches] Re: [PATCH vshard 0/7] Replicaset " Georgy Kirichenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox