Recovery point manager backend#657
Merged
Gerold103 merged 3 commits intoJul 9, 2026
Merged
Conversation
67ffe0f to
b0775f8
Compare
b0775f8 to
1e02c7c
Compare
Gerold103
reviewed
Jul 7, 2026
1e02c7c to
d1134f9
Compare
storage/init.lua is close to the LuaJIT limit of 200 local variables per file. Inline the `index_has` and `cfg_check_option` shortcuts, which are each used only in a single function, in order to free two local slots for the upcoming code. NO_DOC=refactoring NO_TEST=refactoring
The static router name '_static_router' was a local constant in vshard/router/init.lua. Move it to consts as STATIC_ROUTER_NAME, so it can be reused from other modules: it will be needed in the next commit, where the recovery point manager backend is introduced. NO_DOC=refactoring NO_TEST=refactoring
bb1c795 to
70b8a75
Compare
Tarantool ships a sharding-agnostic recovery point manager (box.backup.recovery_point.manager* or recovery-point-manager role) which periodically asks a backend to create a recovery point. This commit implements the vshard-router backend for it, so that a vshard cluster can create cluster-consistent recovery points for backup and point-in-time recovery. The backend creates the point on every replicaset master via the new public vshard.router.create_cluster_recovery_point() method rather than calling map_callrw with vshard's internally-exported storage service function (vshard.storage._call) directly: relying on such an internal function from outside of vshard is not good, so the cluster-wide fan-out is wrapped in a proper public router API. Closes tarantool#648 @TarantoolBot document Title: vshard: recovery point manager vshard-router backend Since: VShard 0.1.42 VShard now ships a backend for Tarantool's recovery point manager. It lets a vshard cluster periodically create cluster-consistent recovery points that can later be used for backup and point-in-time recovery of the **whole cluster**. Note, that the whole cluster must be recovered to that point, recovery of one or several replicasets is prohibited and lead to doubled buckets. The backend requires the sharding "router" role. Enable the backend on a router instance by configuring the recovery point manager role with the vshard-router backend, for example: ```yaml roles: [roles.recovery-point-manager] roles_cfg: roles.recovery-point-manager: backend: vshard-router create: timeout: 120 by: interval: 600 ``` The cluster point is created with no bucket rebalancing in progress, which makes it cluster-consistent. The create.timeout option should be about 1.5 times bigger than the storages' sharding.rebalancer_bucket_send_timeout, if recovery points must be created during rebalancing. With too small timeout no recovery point can be created for as long as rebalancing is running. Note that rebalancer_bucket_send_timeout is infinite by default, so set it to a finite value to make recovery points creatable during rebalancing.
70b8a75 to
1d9a87b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #648