aliyun/aliyun-oss-java-sdk

getObject 更新CRC64的值,导致CPU升高

dragonTalon opened this issue · 0 comments

方法:com.aliyun.oss.internal.OSSObjectOperation#getObject(com.aliyun.oss.model.GetObjectRequest)
在OSSObject对象的时候加入了CRC64方法,导致每次reader的时候回去出发CRC64的update
`

  CRC64 crc = new CRC64();

  CheckedInputStream checkedInputstream = new CheckedInputStream(progressInputStream, crc);

  ossObject.setObjectContent(checkedInputstream);

`
读取的时候CheckedInputStream 都会调用cksum.update(b);

`

    public int read() throws IOException {

    int b = in.read();

    if (b != -1) {

        cksum.update(b);

    }

    return b;

}

`

`

    public int read(byte[] buf, int off, int len) throws IOException {

    len = in.read(buf, off, len);

    if (len != -1) {

        cksum.update(buf, off, len);

    }

    return len;

}

`
导致read读取文件时候CPU比不加CRC64的时候高百分之三十.

这里是不是存在问题???

image