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

Unified Diff: server/logdog/storage/bigtable/bigtable.go

Issue 1610993002: LogDog: Add collector service implementation. (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Created 4 years, 11 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: server/logdog/storage/bigtable/bigtable.go
diff --git a/server/logdog/storage/bigtable/bigtable.go b/server/logdog/storage/bigtable/bigtable.go
index 3d4b9abddf0e494f55fe5d25b07e5a91e24e1691..b1038b8dfb640f82a6950a0be9b066201d37eb06 100644
--- a/server/logdog/storage/bigtable/bigtable.go
+++ b/server/logdog/storage/bigtable/bigtable.go
@@ -52,6 +52,14 @@ type btTable interface {
getLogData(c context.Context, rk *rowKey, limit int, keysOnly bool, cb btGetCallback) error
}
+// btTransientSubstrings is the set of known error substrings returned by
+// BigTable that indicate failures that aren't related to the specific data
+// content.
+var btTransientSubstrings = []string{
+ "Internal error encountered",
+ "interactive login is required",
dnj (Google) 2016/01/21 04:36:25 Learning as we go.
+}
+
// btTableProd is an implementation of the btTable interface that uses a real
// production BigTable connection.
type btTableProd struct {
@@ -150,8 +158,10 @@ func isTransient(err error) bool {
}
msg := err.Error()
- if strings.Contains(msg, "Internal error encountered") {
- return true
+ for _, s := range btTransientSubstrings {
+ if strings.Contains(msg, s) {
+ return true
+ }
}
return false
}
« server/internal/logdog/service/service.go ('K') | « server/internal/logdog/service/service.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698