Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: server/logdog/archive/archive.go

Issue 1863973002: LogDog: Update to archival V2. (Closed) Base URL: https://github.com/luci/luci-go@grpcutil-errors
Patch Set: Fix proto comment. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « server/internal/logdog/service/service.go ('k') | server/logdog/storage/archive/storage.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/logdog/archive/archive.go
diff --git a/server/logdog/archive/archive.go b/server/logdog/archive/archive.go
index 22c63ec014c61df4c306680d3690f2980b0b8138..ad1f0e808936c8a62cb93d1cce67d9495bf0d885 100644
--- a/server/logdog/archive/archive.go
+++ b/server/logdog/archive/archive.go
@@ -10,6 +10,7 @@ import (
"io"
"github.com/golang/protobuf/proto"
+ "github.com/luci/luci-go/common/errors"
"github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/common/parallel"
"github.com/luci/luci-go/common/proto/logdog/logpb"
@@ -85,7 +86,7 @@ func Archive(m Manifest) error {
}
}
- return parallel.FanOutIn(func(taskC chan<- func() error) {
+ err := parallel.FanOutIn(func(taskC chan<- func() error) {
var logC chan *logpb.LogEntry
if m.LogWriter != nil {
logC = make(chan *logpb.LogEntry)
@@ -145,6 +146,12 @@ func Archive(m Manifest) error {
}
}
})
+
+ // If any of the returned errors was transient, return a transient error.
+ if errors.Any(err, errors.IsTransient) {
+ err = errors.WrapTransient(err)
+ }
+ return err
}
func archiveLogs(w io.Writer, d *logpb.LogStreamDescriptor, logC <-chan *logpb.LogEntry, idx *indexBuilder) error {
« no previous file with comments | « server/internal/logdog/service/service.go ('k') | server/logdog/storage/archive/storage.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698