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

Unified Diff: tokenserver/appengine/impl/utils/bqlog/bqlog.go

Issue 2951393002: [errors] de-specialize Transient in favor of Tags. (Closed)
Patch Set: copyright Created 3 years, 6 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
Index: tokenserver/appengine/impl/utils/bqlog/bqlog.go
diff --git a/tokenserver/appengine/impl/utils/bqlog/bqlog.go b/tokenserver/appengine/impl/utils/bqlog/bqlog.go
index 0892b52db9378ec0e3bb71fb038a717767da0c85..63b7d41372c9e17726a913fc4cf352389e4bac42 100644
--- a/tokenserver/appengine/impl/utils/bqlog/bqlog.go
+++ b/tokenserver/appengine/impl/utils/bqlog/bqlog.go
@@ -578,7 +578,7 @@ func (f *asyncFlusher) upload(ctx context.Context, chunk chunk) (int, error) {
dt := clock.Since(ctx, startTime)
bigQueryLatency.Add(ctx, float64(dt.Nanoseconds()/1e6), f.TableRef, "insertAll", status)
if code >= 500 {
- return errors.WrapTransient(err)
+ return retry.Tag.Apply(err)
}
return err
}, func(err error, wait time.Duration) {
@@ -589,7 +589,7 @@ func (f *asyncFlusher) upload(ctx context.Context, chunk chunk) (int, error) {
})
if err != nil {
logging.WithError(err).Errorf(ctx, "Failed to send data to BigQuery")
- if !errors.IsTransient(err) && err != context.DeadlineExceeded {
+ if !retry.Tag.In(err) && err != context.DeadlineExceeded {
chunk.Done(ctx)
}
return 0, err

Powered by Google App Engine
This is Rietveld 408576698