lpdeal: Use serialization retry option

This commit is contained in:
Łukasz Magiera 2024-02-20 13:17:29 +01:00
parent 94a31c6db6
commit f2ebde4d10
3 changed files with 3 additions and 3 deletions

View File

@ -565,9 +565,8 @@ var lpBoostProxyCmd = &cli.Command{
server := &http.Server{
Addr: cctx.String("listen"),
Handler: mux,
ReadTimeout: 15 * time.Second,
ReadTimeout: 48 * time.Hour,
WriteTimeout: 48 * time.Hour, // really high because we block until TreeD
IdleTimeout: 60 * time.Second,
}
return server.ListenAndServe()

View File

@ -112,7 +112,7 @@ func AllocateSectorNumbers(ctx context.Context, a AllocAPI, db *harmonydb.DB, ma
}
return true, nil
})
}, harmonydb.RetrySerializationErr())
if err != nil {
return nil, xerrors.Errorf("allocating sector numbers: %w", err)

View File

@ -248,6 +248,7 @@ func (u *UrlPieceReader) Read(p []byte) (n int, err error) {
// if we're below the RawSize, return an unexpected EOF error
if u.readSoFar < u.RawSize {
log.Errorw("unexpected EOF", "readSoFar", u.readSoFar, "rawSize", u.RawSize, "url", u.Url)
return n, io.ErrUnexpectedEOF
}
}