diff --git a/internal/bufferedwrites/upload_handler.go b/internal/bufferedwrites/upload_handler.go index 8a72faa27d..4e95084c95 100644 --- a/internal/bufferedwrites/upload_handler.go +++ b/internal/bufferedwrites/upload_handler.go @@ -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 diff --git a/internal/bufferedwrites/upload_handler_test.go b/internal/bufferedwrites/upload_handler_test.go index 55c9b70f18..0fa44aed2f 100644 --- a/internal/bufferedwrites/upload_handler_test.go +++ b/internal/bufferedwrites/upload_handler_test.go @@ -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) @@ -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)