forked from greenplum-db/gpbackup-archive
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use separate error buffers for different processes in gprestore helper (
#87) Problem description: gprestore helper reused one error buffer for stderr of multiple processes when it worked with a plugin. It resulted in the following problem: if the plugin was launched several times, the error could be detected only on the 2nd run, while the error happens (i.e. plugin outputs something to the stderr) on each plugin run. Fix: Add a separate error buffer for each RestoreReader. As now there is no need for global 'errBuf' variable, it was moved to 'doBackupAgent' as a local variable (keeping it global without obvious need is a bad practice). For the backup helper case, it is ok to have only one buffer as only one backup plugin instance is started for each backup helper. Tests are not added because the problem has no stable reproduction scenario - it depends on the timing of writing to the stderr. (cherry picked from commit ab19bff)
- Loading branch information
Showing
3 changed files
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters