vnode/cos: error on incomplete fetching

This commit is contained in:
Minglei Jin 2023-11-08 20:43:52 +08:00
parent 128353a861
commit 5ccdde4495
1 changed files with 5 additions and 0 deletions

View File

@ -775,6 +775,11 @@ int32_t s3GetObjectBlock(const char *object_name, int64_t offset, int64_t size,
return TAOS_SYSTEM_ERROR(EIO);
}
if (cbd.buf_pos != size) {
vError("%s: %d(%s)", __func__, cbd.status, cbd.err_msg);
return TAOS_SYSTEM_ERROR(EIO);
}
*ppBlock = cbd.buf;
return 0;