mem leak
This commit is contained in:
parent
7e2ce6381f
commit
4c9763d2c1
|
@ -649,12 +649,12 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) {
|
|||
mInfo("trans:%d, check compact finished:%d, vgId:%d, dnodeId:%d, numberFileset:%d, finished:%d",
|
||||
pTrans->id, pDetail->compactId, pDetail->vgId, pDetail->dnodeId, pDetail->numberFileset, pDetail->finished);
|
||||
|
||||
if(pDetail->numberFileset == 0 && pDetail->finished == 0){
|
||||
if(pDetail->numberFileset == -1 && pDetail->finished == -1){
|
||||
allFinished = false;
|
||||
sdbRelease(pMnode->pSdb, pDetail);
|
||||
break;
|
||||
}
|
||||
if (pDetail->numberFileset != 0 && pDetail->finished != 0 &&
|
||||
if (pDetail->numberFileset != -1 && pDetail->finished != -1 &&
|
||||
pDetail->numberFileset != pDetail->finished) {
|
||||
allFinished = false;
|
||||
sdbRelease(pMnode->pSdb, pDetail);
|
||||
|
@ -695,9 +695,11 @@ static int32_t mndSaveCompactProgress(SMnode *pMnode, int32_t compactId) {
|
|||
if (mndTransPrepare(pMnode, pTrans) != 0) {
|
||||
mError("trans:%d, failed to prepare since %s", pTrans->id, terrstr());
|
||||
mndTransDrop(pTrans);
|
||||
sdbRelease(pMnode->pSdb, pCompact);
|
||||
return -1;
|
||||
}
|
||||
|
||||
sdbRelease(pMnode->pSdb, pCompact);
|
||||
mndTransDrop(pTrans);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -276,6 +276,10 @@ int32_t mndAddCompactDetailToTran(SMnode *pMnode, STrans *pTrans, SCompactObj* p
|
|||
compactDetail.vgId = pVgroup->vgId;
|
||||
compactDetail.dnodeId = pVgid->dnodeId;
|
||||
compactDetail.startTime = taosGetTimestampMs();
|
||||
compactDetail.numberFileset = -1;
|
||||
compactDetail.finished = -1;
|
||||
compactDetail.newNumberFileset = -1;
|
||||
compactDetail.newFinished = -1;
|
||||
|
||||
SSdbRaw *pVgRaw = mndCompactDetailActionEncode(&compactDetail);
|
||||
if (pVgRaw == NULL) return -1;
|
||||
|
|
Loading…
Reference in New Issue