enh: rsma fs process optimization
This commit is contained in:
parent
ff647b961d
commit
8403f4ab35
|
@ -210,15 +210,18 @@ static int32_t tdUpdateQTaskInfoFiles(SSma *pSma, SRSmaStat *pStat) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fsMaxVer < committed) {
|
if (fsMaxVer < committed) {
|
||||||
SQTaskFile qFile = {.nRef = 1, .padding = 0, .version = committed, .size = 0};
|
tdRSmaQTaskInfoGetFullName(TD_VID(pVnode), committed, tfsGetPrimaryPath(pVnode->pTfs), qTaskInfoFullName);
|
||||||
if (taosArrayPush(pFS->aQTaskInf, &qFile) < 0) {
|
if (taosCheckExistFile(qTaskInfoFullName)) {
|
||||||
taosWUnLockLatch(RSMA_FS_LOCK(pStat));
|
SQTaskFile qFile = {.nRef = 1, .padding = 0, .version = committed, .size = 0};
|
||||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
if (taosArrayPush(pFS->aQTaskInf, &qFile) < 0) {
|
||||||
return TSDB_CODE_FAILED;
|
taosWUnLockLatch(RSMA_FS_LOCK(pStat));
|
||||||
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
return TSDB_CODE_FAILED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
smaDebug("vgId:%d, update qinf, no need as committed %" PRIi64 " not larger than fsMaxVer %" PRIi64, TD_VID(pVnode),
|
smaDebug("vgId:%d, update qinf, no need as committed %" PRIi64 " not larger than fsMaxVer %" PRIi64, TD_VID(pVnode),
|
||||||
committed, fsMaxVer);
|
committed, fsMaxVer);
|
||||||
}
|
}
|
||||||
|
|
||||||
taosWUnLockLatch(RSMA_FS_LOCK(pStat));
|
taosWUnLockLatch(RSMA_FS_LOCK(pStat));
|
||||||
|
|
Loading…
Reference in New Issue