diff --git a/backend/oracleobjectstorage/multipart.go b/backend/oracleobjectstorage/multipart.go index f5af23a11..615032ed2 100644 --- a/backend/oracleobjectstorage/multipart.go +++ b/backend/oracleobjectstorage/multipart.go @@ -16,6 +16,7 @@ import ( "github.com/ncw/swift/v2" "github.com/rclone/rclone/lib/multipart" + "github.com/rclone/rclone/lib/pool" "golang.org/x/net/http/httpguts" "github.com/oracle/oci-go-sdk/v65/common" @@ -128,6 +129,12 @@ func (w *objectChunkWriter) WriteChunk(ctx context.Context, chunkNumber int, rea err := fmt.Errorf("invalid chunk number provided: %v", chunkNumber) return -1, err } + // Only account after the checksum reads have been done + 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(2) + } m := md5.New() currentChunkSize, err := io.Copy(m, reader) if err != nil {