Skip to content

Commit cda6e63

Browse files
authored
Merge pull request #76 from Azure/dev
v0.5.23
2 parents 14ebad4 + 9c4a6a1 commit cda6e63

File tree

4 files changed

+187
-114
lines changed

4 files changed

+187
-114
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Sources and targets are decoupled, this design enables the composition of variou
2929
Download, extract and set permissions:
3030

3131
```bash
32-
wget -O bp_linux.tar.gz https://github.com/Azure/blobporter/releases/download/v0.5.22/bp_linux.tar.gz
32+
wget -O bp_linux.tar.gz https://github.com/Azure/blobporter/releases/download/v0.5.23/bp_linux.tar.gz
3333
tar -xvf bp_linux.tar.gz linux_amd64/blobporter
3434
chmod +x ~/linux_amd64/blobporter
3535
cd ~/linux_amd64
@@ -46,7 +46,7 @@ export ACCOUNT_KEY=<STORAGE_ACCOUNT_KEY>
4646
4747
### Windows
4848

49-
Download [BlobPorter.exe](https://github.com/Azure/blobporter/releases/download/v0.5.22/bp_windows.zip)
49+
Download [BlobPorter.exe](https://github.com/Azure/blobporter/releases/download/v0.5.23/bp_windows.zip)
5050

5151
Set environment variables (if using the command prompt):
5252

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)