Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(storage): adding request-id in the stall-retry log #11074

Merged
Merged
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
7 changes: 4 additions & 3 deletions storage/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,12 @@ func (c *httpStorageClient) newRangeReaderXML(ctx context.Context, params *newRa
done <- true
}()

// Wait until timeout or request is successful.
timer := time.After(c.dynamicReadReqStallTimeout.getValue(params.bucket))
// Wait until stall timeout or request is successful.
stallTimeout := c.dynamicReadReqStallTimeout.getValue(params.bucket)
timer := time.After(stallTimeout)
select {
case <-timer:
log.Printf("stalled read-req cancelled after %fs", c.dynamicReadReqStallTimeout.getValue(params.bucket).Seconds())
log.Printf("stalled read-req (%p) cancelled after %fs", req, stallTimeout.Seconds())
cancel()
err = context.DeadlineExceeded
if res != nil && res.Body != nil {
Expand Down
Loading