Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions op-batcher/batcher/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"math/big"
_ "net/http/pprof"
"os"
"sync"
"time"

Expand Down Expand Up @@ -629,12 +630,7 @@ func (l *BatchSubmitter) singleEndpointThrottler(wg *sync.WaitGroup, throttleSig
"endpoint", endpoint, "err", err)

// We have a strict requirement that all endpoints must have the SetMaxDASize endpoint, and shut down if this RPC method is not available
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
// Call StopBatchSubmitting in another goroutine to avoid deadlock.
go func() {
_ = l.StopBatchSubmitting(ctx)
}()
os.Exit(1) //nolint:gocritic // this is a shutdown error
Comment on lines -632 to +633
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a viable solution. In general, we only want the batcher main to shutdown. But e.g. if the BatchSubmitter is used in a test environment, we surely don't want to kill the whole process.

I think we just need to fix how a stopped batch submitter shuts down, e.g. that all the goroutines that were started stop and the main routines properly returns.

return
} else if err != nil {
l.Log.Warn("SetMaxDASize RPC failed for endpoint, retrying.", "endpoint", endpoint, "err", err)
Expand Down