提交 f72f129d 编写于 作者: M Minglei Jin

cache/skyline: cleanup del array

上级 c997662b
...@@ -2502,15 +2502,15 @@ static int32_t nextRowIterGet(CacheNextRowIter *pIter, TSDBROW **ppRow, bool *pI ...@@ -2502,15 +2502,15 @@ static int32_t nextRowIterGet(CacheNextRowIter *pIter, TSDBROW **ppRow, bool *pI
uint64_t uid = pIter->idx.uid; uint64_t uid = pIter->idx.uid;
STableLoadInfo *pInfo = getTableLoadInfo(pIter->pr, uid); STableLoadInfo *pInfo = getTableLoadInfo(pIter->pr, uid);
SArray *pTombData = pInfo->pTombData; if (pInfo->pTombData == NULL) {
pInfo->pTombData = taosArrayInit(4, sizeof(SDelData));
if (pTombData) {
taosArrayAddAll(pIter->pMemDelData, pTombData);
} }
size_t delSize = TARRAY_SIZE(pIter->pMemDelData); taosArrayAddAll(pInfo->pTombData, pIter->pMemDelData);
size_t delSize = TARRAY_SIZE(pInfo->pTombData);
if (delSize > 0) { if (delSize > 0) {
code = tsdbBuildDeleteSkyline(pIter->pMemDelData, 0, (int32_t)(delSize - 1), pIter->pSkyline); code = tsdbBuildDeleteSkyline(pInfo->pTombData, 0, (int32_t)(delSize - 1), pIter->pSkyline);
} }
pIter->iSkyline = taosArrayGetSize(pIter->pSkyline) - 1; pIter->iSkyline = taosArrayGetSize(pIter->pSkyline) - 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册