Skip to content

Recovery point manager backend#657

Merged
Gerold103 merged 3 commits into
tarantool:masterfrom
Serpentian:recovery-point-manager-backend
Jul 9, 2026
Merged

Recovery point manager backend#657
Gerold103 merged 3 commits into
tarantool:masterfrom
Serpentian:recovery-point-manager-backend

Conversation

@Serpentian

@Serpentian Serpentian commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Closes #648

@Serpentian Serpentian self-assigned this Jul 7, 2026
@Serpentian Serpentian force-pushed the recovery-point-manager-backend branch 6 times, most recently from 67ffe0f to b0775f8 Compare July 7, 2026 17:47
@Serpentian Serpentian marked this pull request as ready for review July 7, 2026 17:47
@Serpentian Serpentian requested a review from Gerold103 July 7, 2026 17:47
@Serpentian Serpentian assigned Gerold103 and unassigned Serpentian Jul 7, 2026
@Serpentian Serpentian requested a review from mrForza July 7, 2026 17:47
@Serpentian Serpentian removed the request for review from mrForza July 7, 2026 17:48
@Serpentian Serpentian added the do not merge Not ready to be merged label Jul 7, 2026
@Serpentian Serpentian force-pushed the recovery-point-manager-backend branch from b0775f8 to 1e02c7c Compare July 7, 2026 18:00
@Serpentian Serpentian removed the do not merge Not ready to be merged label Jul 7, 2026

@Gerold103 Gerold103 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top as always 💪.

Comment thread roles/recovery-point-manager/backends/vshard-router.lua Outdated
Comment thread roles/recovery-point-manager/backends/vshard-router.lua Outdated
Comment thread roles/recovery-point-manager/backends/vshard-router.lua Outdated
Comment thread vshard/util.lua Outdated
Comment thread test/router-luatest/recovery_point_test.lua Outdated
@Serpentian Serpentian force-pushed the recovery-point-manager-backend branch from 1e02c7c to d1134f9 Compare July 8, 2026 12:28
@Serpentian Serpentian requested a review from Gerold103 July 8, 2026 13:00
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
@Serpentian Serpentian force-pushed the recovery-point-manager-backend branch 4 times, most recently from bb1c795 to 70b8a75 Compare July 9, 2026 09:43
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.
@Serpentian Serpentian force-pushed the recovery-point-manager-backend branch from 70b8a75 to 1d9a87b Compare July 9, 2026 09:45

@Gerold103 Gerold103 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎬🔝🔥💪!

@Gerold103 Gerold103 merged commit f7b998b into tarantool:master Jul 9, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a handle to inform backup agents about rebalancing

3 participants