enh: meta pause/resume for sys table scan
This commit is contained in:
parent
a9ba534f48
commit
e18f056c9f
|
@ -522,6 +522,8 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) {
|
||||||
int32_t ret = 0;
|
int32_t ret = 0;
|
||||||
if (pInfo->pCur == NULL) {
|
if (pInfo->pCur == NULL) {
|
||||||
pInfo->pCur = pAPI->metaFn.openTableMetaCursor(pInfo->readHandle.vnode);
|
pInfo->pCur = pAPI->metaFn.openTableMetaCursor(pInfo->readHandle.vnode);
|
||||||
|
} else {
|
||||||
|
pAPI->metaFn.resumeTableMetaCursor(pInfo->pCur, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pInfo->pSchema == NULL) {
|
if (pInfo->pSchema == NULL) {
|
||||||
|
@ -599,6 +601,7 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) {
|
||||||
pInfo->restore = true;
|
pInfo->restore = true;
|
||||||
|
|
||||||
if (pInfo->pRes->info.rows > 0) {
|
if (pInfo->pRes->info.rows > 0) {
|
||||||
|
pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -607,6 +610,7 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numOfRows > 0) {
|
if (numOfRows > 0) {
|
||||||
|
pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur);
|
||||||
relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock, pOperator->exprSupp.pFilterInfo);
|
relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock, pOperator->exprSupp.pFilterInfo);
|
||||||
numOfRows = 0;
|
numOfRows = 0;
|
||||||
}
|
}
|
||||||
|
@ -702,6 +706,8 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
|
||||||
int32_t ret = 0;
|
int32_t ret = 0;
|
||||||
if (pInfo->pCur == NULL) {
|
if (pInfo->pCur == NULL) {
|
||||||
pInfo->pCur = pAPI->metaFn.openTableMetaCursor(pInfo->readHandle.vnode);
|
pInfo->pCur = pAPI->metaFn.openTableMetaCursor(pInfo->readHandle.vnode);
|
||||||
|
} else {
|
||||||
|
pAPI->metaFn.resumeTableMetaCursor(pInfo->pCur, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool blockFull = false;
|
bool blockFull = false;
|
||||||
|
@ -741,6 +747,7 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
|
||||||
numOfRows = 0;
|
numOfRows = 0;
|
||||||
|
|
||||||
if (pInfo->pRes->info.rows > 0) {
|
if (pInfo->pRes->info.rows > 0) {
|
||||||
|
pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -749,6 +756,7 @@ static SSDataBlock* sysTableScanUserTags(SOperatorInfo* pOperator) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numOfRows > 0) {
|
if (numOfRows > 0) {
|
||||||
|
pAPI->metaFn.pauseTableMetaCursor(pInfo->pCur);
|
||||||
relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock, pOperator->exprSupp.pFilterInfo);
|
relocateAndFilterSysTagsScanResult(pInfo, numOfRows, dataBlock, pOperator->exprSupp.pFilterInfo);
|
||||||
numOfRows = 0;
|
numOfRows = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue