s3: fix accounting for mulpart transfers after migration to SDKv2 #4989
This commit is contained in:
parent
af9f8ced80
commit
6b58cd0870
1 changed files with 7 additions and 1 deletions
|
@ -5988,7 +5988,13 @@ func (w *s3ChunkWriter) WriteChunk(ctx context.Context, chunkNumber int, reader
|
|||
if do, ok := reader.(pool.DelayAccountinger); ok {
|
||||
// To figure out this number, do a transfer and if the accounted size is 0 or a
|
||||
// multiple of what it should be, increase or decrease this number.
|
||||
do.DelayAccounting(3)
|
||||
//
|
||||
// For transfers over https the SDK does not sign the body whereas over http it does
|
||||
if len(w.f.opt.Endpoint) >= 5 && strings.EqualFold(w.f.opt.Endpoint[:5], "http:") {
|
||||
do.DelayAccounting(3)
|
||||
} else {
|
||||
do.DelayAccounting(2)
|
||||
}
|
||||
}
|
||||
|
||||
// create checksum of buffer for integrity checking
|
||||
|
|
Loading…
Reference in a new issue