Skip to content

Commit

Permalink
remove chunk retry timeout for buffered writes writer (#2954)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmeenkaur authored Jan 30, 2025
1 parent e62b5a6 commit 582233c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit 582233c

Please sign in to comment.