enh: add check for tpagebuf
This commit is contained in:
parent
fa0f6b50dc
commit
167e58578a
|
@ -295,11 +295,7 @@ int32_t tSimpleHashIterateRemove(SSHashObj *pHashObj, const void *key, size_t ke
|
|||
}
|
||||
|
||||
if (*pIter == (void *)GET_SHASH_NODE_DATA(pNode)) {
|
||||
if (!pPrev) {
|
||||
*pIter = NULL;
|
||||
} else {
|
||||
*pIter = GET_SHASH_NODE_DATA(pPrev);
|
||||
}
|
||||
*pIter = pPrev ? GET_SHASH_NODE_DATA(pPrev) : NULL;
|
||||
}
|
||||
|
||||
FREE_HASH_NODE(pNode);
|
||||
|
|
|
@ -465,6 +465,7 @@ void* getBufPage(SDiskbasedBuf* pBuf, int32_t id) {
|
|||
// set the ptr to the new SPageInfo
|
||||
((void**)((*pi)->pData))[0] = (*pi);
|
||||
|
||||
assert(listNEles(pBuf->lruList) < pBuf->inMemPages && pBuf->inMemPages > 0);
|
||||
lruListPushFront(pBuf->lruList, *pi);
|
||||
(*pi)->used = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue