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

Remove chunk retry timeout for buffered writes writer #2954

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion internal/bufferedwrites/upload_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ func (uh *UploadHandler) Upload(block block.Block) error {

// createObjectWriter creates a GCS object writer.
func (uh *UploadHandler) createObjectWriter() (err error) {
req := gcs.NewCreateObjectRequest(uh.obj, uh.objectName, nil, uh.chunkTransferTimeout)
// TODO: b/381479965: Dynamically set chunkTransferTimeoutSecs based on chunk size. 0 here means no timeout.
req := gcs.NewCreateObjectRequest(uh.obj, uh.objectName, nil, 0)
// We need a new context here, since the first writeFile() call will be complete
// (and context will be cancelled) by the time complete upload is done.
var ctx context.Context
Expand Down
4 changes: 2 additions & 2 deletions internal/bufferedwrites/upload_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (t *UploadHandlerTest) TestCreateObjectChunkWriterIsCalledWithCorrectReques
*req.MetaGenerationPrecondition == t.uh.obj.MetaGeneration &&
req.ContentEncoding == t.uh.obj.ContentEncoding &&
req.ContentType == t.uh.obj.ContentType &&
req.ChunkTransferTimeoutSecs == chunkTransferTimeoutSecs
req.ChunkTransferTimeoutSecs == 0
}),
mock.Anything,
mock.Anything).Return(writer, nil)
Expand All @@ -324,7 +324,7 @@ func (t *UploadHandlerTest) TestCreateObjectChunkWriterIsCalledWithCorrectReques
return req.Name == t.uh.objectName &&
*req.GenerationPrecondition == 0 &&
req.MetaGenerationPrecondition == nil &&
req.ChunkTransferTimeoutSecs == chunkTransferTimeoutSecs
req.ChunkTransferTimeoutSecs == 0
}),
mock.Anything,
mock.Anything).Return(writer, nil)
Expand Down
Loading