mirror of
https://github.com/dolthub/dolt.git
synced 2025-12-30 08:50:01 -06:00
Merge pull request #10094 from dolthub/aaron/fix-aws-conjoin
go/store/nbs: Fix NomsBlockStore Conjoin against AWS S3 when the AWS S3 endpoint requires a Content-Length header.
This commit is contained in:
@@ -373,10 +373,14 @@ func (s3p awsTablePersister) assembleTable(ctx context.Context, plan compactionP
|
||||
} else if end < lbuf {
|
||||
rdr = bytes.NewReader(buff[start:end])
|
||||
} else {
|
||||
rdr = io.MultiReader(
|
||||
bytes.NewReader(buff[start:]),
|
||||
bytes.NewReader(tail[:end-lbuf]),
|
||||
)
|
||||
// UploadPart needs a ReadSeeker, so we can't use a simple
|
||||
// io.MultiReader here. We can revisit this later, but for
|
||||
// now we make an unquota'd copy of these two buffers which
|
||||
// must live until the upload is done.
|
||||
data := make([]byte, 0, len(buff[start:])+len(tail[:end-lbuf]))
|
||||
data = append(data, buff[start:]...)
|
||||
data = append(data, tail[:end-lbuf]...)
|
||||
rdr = bytes.NewReader(data)
|
||||
}
|
||||
uploadWg.Add(1)
|
||||
go func(data io.Reader, partNum int32) {
|
||||
|
||||
Reference in New Issue
Block a user