-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix(lsbackup): Fix profiler in lsBackup (#7729) #8432
Conversation
Make lsbackup use the right conf for profiler.
|
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.
Hi Dilip, as we have discussed, please add unit test for backup/run.go.
ee/backup/run.go
Outdated
@@ -42,6 +43,7 @@ import ( | |||
) | |||
|
|||
// Restore is the sub-command used to restore a backup. | |||
|
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.
This is an unnecessary change.
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.
@akon-dey the var Restore x.SubCommand on line 47 is used in other part of the code. So I had to re-introduce to fix the errors
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 like github isnt showing the line 47 addition unless you click view changes, not sure if you missed that
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.
I think the problem Akon is referring to is the blank line between the comment and the variable declaration.
@@ -162,7 +164,7 @@ func initBackupLs() { | |||
Short: "List info on backups in a given location", | |||
Args: cobra.NoArgs, | |||
Run: func(cmd *cobra.Command, args []string) { | |||
defer x.StartProfile(Restore.Conf).Stop() | |||
defer x.StartProfile(LsBackup.Conf).Stop() |
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.
LGTM
This will need an backup integration test |
Please add some details about the change in the PR description. |
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.
fixed
this requires a backup to test
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. Please merge
This fix allows profiling of the Backup operation to work properly if certain profilng flags are specified in the configuration. Previously, the system was profiling restore instead of backup. |
cherry pick from #7729
Problem
wrong config set for profiler (set to Restore instead of Backup)<!--
Please add a description with these things:
[Breaking]
in the title. In the description, please put a note with exactly who these changes are breaking for.-->
Solution
set profiler to Backup.conf