resolve comment
This commit is contained in:
parent
89be4351dc
commit
42eb599d35
|
@ -290,7 +290,7 @@ static int32_t sdbReadFileImp(SSdb *pSdb) {
|
||||||
bufLen = pRaw->dataLen * 2;
|
bufLen = pRaw->dataLen * 2;
|
||||||
SSdbRaw *pNewRaw = taosMemoryMalloc(bufLen + 100);
|
SSdbRaw *pNewRaw = taosMemoryMalloc(bufLen + 100);
|
||||||
if (pNewRaw == NULL) {
|
if (pNewRaw == NULL) {
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
mError("failed read sdb file since malloc new sdbRaw size:%d failed", bufLen);
|
mError("failed read sdb file since malloc new sdbRaw size:%d failed", bufLen);
|
||||||
goto _OVER;
|
goto _OVER;
|
||||||
}
|
}
|
||||||
|
@ -317,6 +317,10 @@ static int32_t sdbReadFileImp(SSdb *pSdb) {
|
||||||
int32_t count = 0;
|
int32_t count = 0;
|
||||||
|
|
||||||
char *plantContent = taosMemoryMalloc(ENCRYPTED_LEN(pRaw->dataLen));
|
char *plantContent = taosMemoryMalloc(ENCRYPTED_LEN(pRaw->dataLen));
|
||||||
|
if (plantContent == NULL) {
|
||||||
|
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
goto _OVER;
|
||||||
|
}
|
||||||
|
|
||||||
SCryptOpts opts;
|
SCryptOpts opts;
|
||||||
opts.len = ENCRYPTED_LEN(pRaw->dataLen);
|
opts.len = ENCRYPTED_LEN(pRaw->dataLen);
|
||||||
|
@ -360,8 +364,7 @@ _OVER:
|
||||||
taosCloseFile(&pFile);
|
taosCloseFile(&pFile);
|
||||||
sdbFreeRaw(pRaw);
|
sdbFreeRaw(pRaw);
|
||||||
|
|
||||||
terrno = code;
|
TAOS_RETURN(code);
|
||||||
return code;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t sdbReadFile(SSdb *pSdb) {
|
int32_t sdbReadFile(SSdb *pSdb) {
|
||||||
|
@ -763,7 +766,7 @@ int32_t sdbDoWrite(SSdb *pSdb, SSdbIter *pIter, void *pBuf, int32_t len) {
|
||||||
if (writelen != len) {
|
if (writelen != len) {
|
||||||
code = TAOS_SYSTEM_ERROR(errno);
|
code = TAOS_SYSTEM_ERROR(errno);
|
||||||
mError("failed to write len:%d since %s, total:%" PRId64, len, tstrerror(code), pIter->total);
|
mError("failed to write len:%d since %s, total:%" PRId64, len, tstrerror(code), pIter->total);
|
||||||
return -1;
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
pIter->total += writelen;
|
pIter->total += writelen;
|
||||||
|
|
Loading…
Reference in New Issue