From 52dda0b4a4217792165505f59b26eda41c4301ef Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Fri, 18 Aug 2023 06:26:14 -0400 Subject: [PATCH] Fix `BackupShard` to get its options from its own flags Presumably a copy-paste error that got missed, it was previously reading all its options (except `--incremental-from-pos`) from the flags defined on the `Backup` command, which effectively meant it accepted those flags on the command line but disregarded their actual values. Yikes! Signed-off-by: Andrew Mason --- go/cmd/vtctldclient/command/backups.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go/cmd/vtctldclient/command/backups.go b/go/cmd/vtctldclient/command/backups.go index 614b693319b..f0c30a5f8f9 100644 --- a/go/cmd/vtctldclient/command/backups.go +++ b/go/cmd/vtctldclient/command/backups.go @@ -136,10 +136,10 @@ func commandBackupShard(cmd *cobra.Command, args []string) error { stream, err := client.BackupShard(commandCtx, &vtctldatapb.BackupShardRequest{ Keyspace: keyspace, Shard: shard, - AllowPrimary: backupOptions.AllowPrimary, - Concurrency: backupOptions.Concurrency, + AllowPrimary: backupShardOptions.AllowPrimary, + Concurrency: backupShardOptions.Concurrency, IncrementalFromPos: backupShardOptions.IncrementalFromPos, - UpgradeSafe: backupOptions.UpgradeSafe, + UpgradeSafe: backupShardOptions.UpgradeSafe, }) if err != nil { return err