-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vtctldserver] Add additional backup info fields #8321
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Neither comment is blocking.
Name: bh.Name(), | ||
Directory: bh.Directory(), | ||
} | ||
|
||
if parts := strings.Split(bi.Name, "."); len(parts) == 3 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking (scope-creepy) suggestion: colocating this backup name parse logic with the format call that happens in mysqlctl/backup.go could be useful for searchability (and any future refactors).
topodata.TabletAlias tablet_alias = 5; | ||
vttime.Time time = 6; | ||
|
||
// The following fields are may or may not be currently set. Work is inflight |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be useful to create + link an issue for this. Up to you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…tBackupsRequest Signed-off-by: Andrew Mason <[email protected]>
Signed-off-by: Andrew Mason <[email protected]>
…, add limiting Signed-off-by: Andrew Mason <[email protected]>
We're not including the Detailed fields here yet, because they are unused in the server implementation (for now). Signed-off-by: Andrew Mason <[email protected]>
Signed-off-by: Andrew Mason <[email protected]>
b280a4d
to
411950f
Compare
…info [vtctldserver] Add additional backup info fields Signed-off-by: Andrew Mason <[email protected]>
…info [vtctldserver] Add additional backup info fields Signed-off-by: Andrew Mason <[email protected]>
Description
This PR adds the following additional fields to the
BackupInfo
proto message:Keyspace
=> set by VtctldServerShard
=> set by VtctldServerTime
=> the time the backup started, parsed out of the backuphandle name, set byBackupHandleToProto
TabletAlias
=> the alias of the tablet that took the backup, parsed out of the backuphandle name, set byBackupHandleToProto
Engine
=> the name of the backupstorage engine that produced the backup, currently unset, to be added in a future PRStatus
=> the status of the backup, to be set by a combination of the backupengine implementation and the backupstorage.BackupHandle implementation; currently unset, to be added in a future PR.We also add limiting fields to the GetBackupsRequest, to reduce the number of backup infos that have to be marshaled and sent over network; this is especially useful in the case where the caller is interested only in the most recent backup. In a future change we can revisit adding time-based filtering (i.e. "give me all backups before $x and after $y"), but I didn't want to tackle that now.
Finally, I updated the CLI to expose the limit field, and also to change the posargs from
$keyspace $shard
as two arguments to the more standard${keyspace}/${shard}
single argument.Examples:
Related Issue(s)
#7352
Checklist
Deployment Notes