This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.09k
stars
1.2k
forks
source link
Non integer blockSize causing byte(s) to be omitted from uploaded blobs. #31763
Describe the bug
A non-integer blockSize in BlockBlobClient.uploadData causes bytes to be omitted (on chunk boundaries?) in the uploaded file. I suspect this is a rounding error!
To Reproduce
Steps to reproduce the behavior:
Create a file with 1637734 bytes long:
cat /dev/random | head -c 1637734 > test-file
Try and upload 20 chunks, (blockSize = file size / 20 which is 81886.7)
Observe a missing byte halfway through.
Expected behavior
To not omit the byte.
Screenshots
N/A
Additional context
I appreciate that this is a case of GIGO - but believe there should be a warming (at least) for poorly-conditioned blob block size / this should not result in missing byte.
Describe the bug A non-integer
blockSize
inBlockBlobClient.uploadData
causes bytes to be omitted (on chunk boundaries?) in the uploaded file. I suspect this is a rounding error!To Reproduce Steps to reproduce the behavior:
cat /dev/random | head -c 1637734 > test-file
blockSize = file size / 20
which is81886.7
)Expected behavior To not omit the byte.
Screenshots N/A
Additional context I appreciate that this is a case of GIGO - but believe there should be a warming (at least) for poorly-conditioned blob block size / this should not result in missing byte.