Skip to content

Commit 2e83f69

Browse files
committed
Remove Sleep & Add buffer limit
1 parent 1e376c8 commit 2e83f69

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cloud/objstore/objutil/uploader.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"sync"
1010
"sync/atomic"
1111

12-
"time"
1312
"github.com/couchbase/tools-common/cloud/v2/objstore/objcli"
1413
"github.com/couchbase/tools-common/cloud/v2/objstore/objcli/objaws"
1514
"github.com/couchbase/tools-common/cloud/v2/objstore/objval"
@@ -115,7 +114,7 @@ func NewMPUploader(opts MPUploaderOptions) (*MPUploader, error) {
115114
}
116115

117116
// Only create the pool after successfully creating the multipart upload to avoid having to handle cleanup
118-
uploader.pool = hofp.NewPool(hofp.Options{LogPrefix: "(objutil)"})
117+
uploader.pool = hofp.NewPool(hofp.Options{LogPrefix: "(objutil)", Size: 1})
119118

120119
return uploader, nil
121120
}
@@ -182,8 +181,6 @@ func (m *MPUploader) upload(ctx context.Context, number int, metadata any, body
182181
return fmt.Errorf("failed to upload part: %w", err)
183182
}
184183

185-
time.Sleep(30*time.Second)
186-
fmt.Println("Sleeping here")
187184
// Parts may be uploaded concurrently, but must be marked as completed one at a time
188185
m.lock.Lock()
189186
defer m.lock.Unlock()

0 commit comments

Comments
 (0)