From 28fd0574dbda478f6963d381715d390aae9fbc8e Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Sat, 13 Jun 2020 05:38:21 +0000 Subject: [PATCH] TD-353 --- src/tsdb/src/tsdbMemTable.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tsdb/src/tsdbMemTable.c b/src/tsdb/src/tsdbMemTable.c index cfb405f518..ab8cccb293 100644 --- a/src/tsdb/src/tsdbMemTable.c +++ b/src/tsdb/src/tsdbMemTable.c @@ -108,9 +108,13 @@ int tsdbUnRefMemTable(STsdbRepo *pRepo, SMemTable *pMemTable) { if (tsdbLockRepo(pRepo) < 0) return -1; while ((pNode = tdListPopHead(pMemTable->bufBlockList)) != NULL) { tdListAppendNode(pBufPool->bufBlockList, pNode); - if (pthread_cond_signal(&pBufPool->poolNotEmpty) != 0) { - // TODO - } + } + int code = pthread_cond_signal(&pBufPool->poolNotEmpty); + if (code != 0) { + tsdbUnlockRepo(pRepo); + tsdbError("vgId:%d failed to signal pool not empty since %s", REPO_ID(pRepo), strerror(code)); + terrno = TAOS_SYSTEM_ERROR(code); + return -1; } if (tsdbUnlockRepo(pRepo) < 0) return -1; -- GitLab