filer write request use context without cancellation (#7567)

* filer use context without cancellation

* pass along context
This commit is contained in:
Chris Lu
2025-11-28 11:52:57 -08:00
committed by GitHub
parent 03ce060e85
commit 7e4bab8032
4 changed files with 13 additions and 7 deletions

View File

@@ -371,7 +371,7 @@ func (uploader *Uploader) upload_content(ctx context.Context, fillBufferFunction
} else {
reqReader = bytes.NewReader(option.BytesBuffer.Bytes())
}
req, postErr := http.NewRequest(http.MethodPost, option.UploadUrl, reqReader)
req, postErr := http.NewRequestWithContext(ctx, http.MethodPost, option.UploadUrl, reqReader)
if postErr != nil {
glog.V(1).InfofCtx(ctx, "create upload request %s: %v", option.UploadUrl, postErr)
return nil, fmt.Errorf("create upload request %s: %v", option.UploadUrl, postErr)