diff --git a/orchestrator/work/worker.go b/orchestrator/work/worker.go index 939dfb18a..94b502d52 100644 --- a/orchestrator/work/worker.go +++ b/orchestrator/work/worker.go @@ -4,11 +4,12 @@ import ( "context" "errors" "fmt" - "google.golang.org/grpc/metadata" "io" "sync/atomic" "time" + "google.golang.org/grpc/metadata" + "github.com/streamingfast/dauth" "github.com/streamingfast/derr" "github.com/streamingfast/dgrpc" @@ -102,7 +103,8 @@ func (w *RemoteWorker) Work(ctx context.Context, unit stage.Unit, workRange *blo var res *Result retryIdx := 0 startTime := time.Now() - err := derr.RetryContext(ctx, 3, func(ctx context.Context) error { + maxRetries := 100 //TODO: make this configurable + err := derr.RetryContext(ctx, uint64(maxRetries), func(ctx context.Context) error { res = w.work(ctx, request, moduleNames, upstream) err := res.Error switch err.(type) { diff --git a/service/tier1.go b/service/tier1.go index f2d8706ce..04d15d105 100644 --- a/service/tier1.go +++ b/service/tier1.go @@ -70,6 +70,8 @@ type Tier1Service struct { getRecentFinalBlock func() (uint64, error) resolveCursor pipeline.CursorResolver getHeadBlock func() (uint64, error) + + maximumTier2Retries uint64 } func getBlockTypeFromStreamFactory(sf *StreamFactory) (string, error) {