-
Notifications
You must be signed in to change notification settings - Fork 3
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
ADBDEV-6011: Fix restore helper hides actual err #100
Conversation
Looks logical, but what is the scenario when it does matter? Can we reproduce the problem fixed and make a test? |
Problem was found theoretically |
Change the commit message:
|
changed |
Can you at least explain when the problem happens and which cases to patch solves? If it's not possible to supply a test. |
test was added |
The commit 4371a94 moved the LoopEnd label so that the err variable began to be overwritten and it will no longer be used below. To fix it, this patch renames the err variable returned by flushAndCloseRestoreWriter to errPipe.
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 change seems logical and allows gpbackup to report error. However, the test system is far from parfect. Tests are very difficult to read, trace and understand.
Fix restore helper hides actual err
The commit 4371a94 moved the LoopEnd label so that the err variable began to be
overwritten and it will no longer be used below. To fix it, this patch renames
the err variable returned by flushAndCloseRestoreWriter to errPipe.
The integration test has been adapted to error-free behavior.
Fix restore helper hides actual err
The commit 4371a94 moved the LoopEnd label so that the err
gpbackup/helper/restore_helper.go
Lines 308 to 310 in 9b07afe
gpbackup/helper/restore_helper.go
Line 322 in 9b07afe
gpbackup/helper/restore_helper.go
Line 335 in 9b07afe
To fix it, this patch renames err variable returned by flushAndCloseRestoreWriter to errPipe.