commit
12bee358c1
|
@ -871,10 +871,10 @@ static void tsdbFreeRows(STsdbRepo *pRepo, void **rows, int rowCounter) {
|
||||||
listNEles(pRepo->mem->bufBlockList), pBufBlock->offset, pBufBlock->remain);
|
listNEles(pRepo->mem->bufBlockList), pBufBlock->offset, pBufBlock->remain);
|
||||||
|
|
||||||
if (pBufBlock->offset == 0) { // return the block to buffer pool
|
if (pBufBlock->offset == 0) { // return the block to buffer pool
|
||||||
tsdbLockRepo(pRepo);
|
if (tsdbLockRepo(pRepo) < 0) return;
|
||||||
SListNode *pNode = tdListPopTail(pRepo->mem->bufBlockList);
|
SListNode *pNode = tdListPopTail(pRepo->mem->bufBlockList);
|
||||||
tdListPrependNode(pBufPool->bufBlockList, pNode);
|
tdListPrependNode(pBufPool->bufBlockList, pNode);
|
||||||
tsdbUnlockRepo(pRepo);
|
if (tsdbUnlockRepo(pRepo) < 0) return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ASSERT(listNEles(pRepo->mem->extraBuffList) > 0);
|
ASSERT(listNEles(pRepo->mem->extraBuffList) > 0);
|
||||||
|
|
|
@ -291,7 +291,10 @@ bool tSkipListIterNext(SSkipListIterator *iter) {
|
||||||
iter->next = SL_NODE_GET_FORWARD_POINTER(iter->cur, 0);
|
iter->next = SL_NODE_GET_FORWARD_POINTER(iter->cur, 0);
|
||||||
iter->step++;
|
iter->step++;
|
||||||
} else {
|
} else {
|
||||||
if (iter->cur == pSkipList->pHead) return false;
|
if (iter->cur == pSkipList->pHead) {
|
||||||
|
tSkipListUnlock(pSkipList);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
iter->cur = SL_NODE_GET_BACKWARD_POINTER(iter->cur, 0);
|
iter->cur = SL_NODE_GET_BACKWARD_POINTER(iter->cur, 0);
|
||||||
|
|
||||||
// a new node is inserted into between iter->cur and iter->next, ignore it
|
// a new node is inserted into between iter->cur and iter->next, ignore it
|
||||||
|
|
Loading…
Reference in New Issue