Skip to content

Commit 6848216

Browse files
committed
Fix: Last batch was not sending the last items from the source.
1 parent 254ab34 commit 6848216

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
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.23" // version number to show in help
57+
programVersion = "0.5.25" // version number to show in help
5858
)
5959

6060
const numOfWorkersFactor = 8

sources/http.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ func newHTTPSource(sourceListManager objectListManager, pipelineFactory sourceHT
4949

5050
for b := 0; b < numOfBatches; b++ {
5151

52+
start = b * numOfFilesInBatch
53+
5254
if filesSent < numOfFilesInBatch {
5355
numOfFilesInBatch = filesSent
5456
}
55-
start = b * numOfFilesInBatch
5657

5758
httpSource := HTTPPipeline{Sources: sourceInfos[start : start+numOfFilesInBatch], HTTPClient: util.NewHTTPClient(), includeMD5: includeMD5}
5859

sources/s3info.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (s *s3InfoProvider) getSourceInfo() ([]pipeline.SourceInfo, error) {
7777
if !s.params.KeepDirStructure {
7878
targetAlias = path.Base(obj.Key)
7979
}
80-
80+
8181
sourceURIs = append(sourceURIs, pipeline.SourceInfo{
8282
SourceName: u.String(),
8383
Size: uint64(obj.Size),
@@ -118,7 +118,7 @@ func (s *s3InfoProvider) getObjectLists() (map[string][]minio.ObjectInfo, error)
118118
if object.Err != nil {
119119
return nil, object.Err
120120
}
121-
121+
fmt.Printf("Object from s3 %+v\n", object)
122122
list = append(list, object)
123123
}
124124

0 commit comments

Comments
 (0)