Skip to content

Commit

Permalink
significantly increase max retries for tier2 requests
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Mar 11, 2024
1 parent 9c7d32d commit 261aadc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions orchestrator/work/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions service/tier1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 261aadc

Please sign in to comment.