Skip to content

Fire vttablet_restore_done hook from RestoreFromBackup RPC path#816

Merged
tanjinx merged 1 commit intoslack-19.0from
stas-backport-19592-v19
Mar 9, 2026
Merged

Fire vttablet_restore_done hook from RestoreFromBackup RPC path#816
tanjinx merged 1 commit intoslack-19.0from
stas-backport-19592-v19

Conversation

@maksimov
Copy link
Copy Markdown

@maksimov maksimov commented Mar 9, 2026

Description

backport vitessio#19592

Fire vttablet_restore_done hook from RestoreFromBackup RPC path.

The hook was only invoked from the RestoreData startup path, but not from the RestoreFromBackup RPC handler. This meant restores
triggered via vtctldclient RestoreFromBackup never fired the hook.

Follow-up to #812 which backported the backup engine env var to v19.

Changes

Add invokeRestoreDoneHook call to RestoreFromBackup in rpc_backup.go, matching the pattern already used in RestoreData.

Test plan

  • Trigger a restore via vtctldclient RestoreFromBackup and verify the vttablet_restore_done hook is executed (visible in
    vttablet logs)
  • Verify hook receives correct env vars: TM_RESTORE_DATA_START_TS, TM_RESTORE_DATA_STOP_TS, TM_RESTORE_DATA_DURATION,
    TM_RESTORE_DATA_BACKUP_ENGINE

Related Issue(s)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Deployment Notes

AI Disclosure

The vttablet_restore_done hook was only invoked from the RestoreData
(startup) path, but not from the RestoreFromBackup RPC handler. This
meant restores triggered via vtctldclient never fired the hook.

Signed-off-by: Stas Maksimov <smaksimov@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@maksimov maksimov requested a review from a team as a code owner March 9, 2026 14:24
@github-actions github-actions Bot added this to the v19.0.7 milestone Mar 9, 2026
@tanjinx tanjinx merged commit dd41012 into slack-19.0 Mar 9, 2026
168 of 169 checks passed
@tanjinx tanjinx deleted the stas-backport-19592-v19 branch March 9, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants