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:
Aaron Son
2025-11-18 14:38:06 -08:00
committed by GitHub

View File

@@ -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) {