Skip to content

Commit

Permalink
error
Browse files Browse the repository at this point in the history
  • Loading branch information
RekGRpth committed Dec 5, 2024
1 parent f590f04 commit 62a0bd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions restore/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ func restoreDataFromTimestamp(fpInfo filepath.FilePathInfo, dataEntries []toc.Co

if err != nil {
atomic.AddInt32(&numErrors, 1)
if errors.Is(err, utils.AgentErr) && MustGetFlagBool(options.ON_ERROR_CONTINUE) && !backupConfig.SingleDataFile && resizeCluster {
dataProgressBar.(*pb.ProgressBar).NotPrint = true
return
}
if errors.Is(err, utils.AgentErr) || !MustGetFlagBool(options.ON_ERROR_CONTINUE) {
dataProgressBar.(*pb.ProgressBar).NotPrint = true
cancel()
Expand Down
3 changes: 2 additions & 1 deletion utils/agent_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,11 @@ func CheckAgentErrorsOnSegments(c *cluster.Cluster, fpInfo filepath.FilePathInfo
return fmt.Sprintf("if ls %[1]s >/dev/null 2>/dev/null; then echo 'error'; fi; rm -f %[1]s", errorFile)
})

agent := filepath.FormatSuffix("agent", helperIdx...)
numErrors := 0
for contentID, cmd := range remoteOutput.Commands {
if strings.TrimSpace(cmd.Stdout) == "error" {
gplog.Verbose("Error occurred with helper agent on segment %d on host %s.", contentID, c.GetHostForContent(contentID))
gplog.Verbose("Error occurred with helper %s on segment %d on host %s.", agent, contentID, c.GetHostForContent(contentID))
numErrors++
}
}
Expand Down

0 comments on commit 62a0bd6

Please sign in to comment.