lpdeal: Use serialization retry option
This commit is contained in:
parent
94a31c6db6
commit
f2ebde4d10
@ -565,9 +565,8 @@ var lpBoostProxyCmd = &cli.Command{
|
|||||||
server := &http.Server{
|
server := &http.Server{
|
||||||
Addr: cctx.String("listen"),
|
Addr: cctx.String("listen"),
|
||||||
Handler: mux,
|
Handler: mux,
|
||||||
ReadTimeout: 15 * time.Second,
|
ReadTimeout: 48 * time.Hour,
|
||||||
WriteTimeout: 48 * time.Hour, // really high because we block until TreeD
|
WriteTimeout: 48 * time.Hour, // really high because we block until TreeD
|
||||||
IdleTimeout: 60 * time.Second,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return server.ListenAndServe()
|
return server.ListenAndServe()
|
||||||
|
@ -112,7 +112,7 @@ func AllocateSectorNumbers(ctx context.Context, a AllocAPI, db *harmonydb.DB, ma
|
|||||||
}
|
}
|
||||||
|
|
||||||
return true, nil
|
return true, nil
|
||||||
})
|
}, harmonydb.RetrySerializationErr())
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Errorf("allocating sector numbers: %w", err)
|
return nil, xerrors.Errorf("allocating sector numbers: %w", err)
|
||||||
|
@ -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 we're below the RawSize, return an unexpected EOF error
|
||||||
if u.readSoFar < u.RawSize {
|
if u.readSoFar < u.RawSize {
|
||||||
|
log.Errorw("unexpected EOF", "readSoFar", u.readSoFar, "rawSize", u.RawSize, "url", u.Url)
|
||||||
return n, io.ErrUnexpectedEOF
|
return n, io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user