From 566bb94b18476b63c06c8565fe0f0960cf123d31 Mon Sep 17 00:00:00 2001 From: Prince Kumar Date: Fri, 1 Nov 2024 14:17:54 +0000 Subject: [PATCH] chore(storage): addeding request-id in the stalled log --- storage/http_client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/storage/http_client.go b/storage/http_client.go index 6baf90547356..221078f3e262 100644 --- a/storage/http_client.go +++ b/storage/http_client.go @@ -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 {