Skip to content

Commit 54d0bf5

Browse files
committed
- pool of open file handles now is constrained to 700 maximum
1 parent 317cc41 commit 54d0bf5

File tree

3 files changed

+175
-113
lines changed

3 files changed

+175
-113
lines changed

blobporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const (
5454
s3AccessKeyEnvVar = "S3_ACCESS_KEY"
5555
s3SecretKeyEnvVar = "S3_SECRET_KEY"
5656

57-
programVersion = "0.5.22" // version number to show in help
57+
programVersion = "0.5.23" // version number to show in help
5858
)
5959

6060
const numOfWorkersFactor = 8

targets/azureblock.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,13 @@ func (t *AzureBlock) CommitList(listInfo *pipeline.TargetCommittedListInfo, numb
4848

4949
blockList := convertToStorageBlockList(lInfo.List, numberOfBlocks)
5050

51-
if util.Verbose {
52-
fmt.Printf("Final BlockList:\n")
53-
for j := 0; j < numberOfBlocks; j++ {
54-
fmt.Printf(" [%2d]: ID=%s, Status=%s\n", j, blockList[j].ID, blockList[j].Status)
55-
}
56-
}
51+
util.PrintfIfDebug("Blocklist -> blob: %s\n list:%+v", targetName, blockList)
5752

5853
//if the max retries is exceeded, panic will happen, hence no error is returned.
5954
duration, _, _ := util.RetriableOperation(func(r int) error {
6055
if err := t.StorageClient.PutBlockList(t.Container, targetName, blockList); err != nil {
6156
t.resetClient()
62-
return err
57+
return fmt.Errorf(" PUT Blocklist Failed: err:%s file:%s\n list:%+v\n --", err, targetName, blockList)
6358
}
6459
return nil
6560
})
@@ -123,15 +118,14 @@ func (t *AzureBlock) WritePart(part *pipeline.Part) (duration time.Duration, sta
123118
headers := make(map[string]string)
124119
userAgent, _ := util.GetUserAgentInfo()
125120
headers["User-Agent"] = userAgent
126-
121+
127122
//if the max retries is exceeded, panic will happen, hence no error is returned.
128123
duration, startTime, numOfRetries = util.RetriableOperation(func(r int) error {
129124
//computation of the MD5 happens is done by the readers.
130125
if part.IsMD5Computed() {
131126
headers["Content-MD5"] = part.MD5()
132127
}
133128

134-
135129
if part.NumberOfBlocks == 1 {
136130
if err := t.StorageClient.CreateBlockBlobFromReader(t.Container,
137131
part.TargetAlias,

0 commit comments

Comments
 (0)