Skip to content

Commit

Permalink
SNOW-1856499 Retry HEAD requests to GCP (#1274)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-pfus authored Jan 16, 2025
1 parent 80c18ea commit b0cd681
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gcs_storage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ func (util *snowflakeGcsClient) getFileHeader(meta *fileMetadata, filename strin
if meta.mockGcsClient != nil {
client = meta.mockGcsClient
}
return client.Do(req)
resp, err := client.Do(req)
if err != nil && strings.HasSuffix(err.Error(), "EOF") {
logger.Debug("Retrying HEAD request because of EOF")
resp, err = client.Do(req)
}
return resp, err
})
if err != nil {
return nil, err
Expand Down

0 comments on commit b0cd681

Please sign in to comment.