fix coredump

This commit is contained in:
Hongze Cheng 2020-06-23 10:58:15 +08:00
parent afb70a9b41
commit 89bfbfddb6
1 changed files with 2 additions and 0 deletions

View File

@ -120,7 +120,9 @@ SListNode *tsdbAllocBufBlockFromPool(STsdbRepo *pRepo) {
STsdbBufPool *pBufPool = pRepo->pPool; STsdbBufPool *pBufPool = pRepo->pPool;
while (POOL_IS_EMPTY(pBufPool)) { while (POOL_IS_EMPTY(pBufPool)) {
pRepo->repoLocked = false;
pthread_cond_wait(&(pBufPool->poolNotEmpty), &(pRepo->mutex)); pthread_cond_wait(&(pBufPool->poolNotEmpty), &(pRepo->mutex));
pRepo->repoLocked = true;
} }
SListNode * pNode = tdListPopHead(pBufPool->bufBlockList); SListNode * pNode = tdListPopHead(pBufPool->bufBlockList);