From b8bedb9c1bc1dcffaaf39fc0e4eefe3284814ba0 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 16 Jul 2020 12:15:17 +0800 Subject: [PATCH] add some debug info --- src/tsdb/src/tsdbMemTable.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tsdb/src/tsdbMemTable.c b/src/tsdb/src/tsdbMemTable.c index a51a172896..b29cec3cf9 100644 --- a/src/tsdb/src/tsdbMemTable.c +++ b/src/tsdb/src/tsdbMemTable.c @@ -204,6 +204,9 @@ void *tsdbAllocBytes(STsdbRepo *pRepo, int bytes) { pBufBlock->offset += bytes; pBufBlock->remain -= bytes; + tsdbTrace("vgId:%d allocate %d bytes from buffer block, nBlocks %d offset %d remain %d", REPO_ID(pRepo), bytes, + listNEles(pRepo->mem->bufBlockList), pBufBlock->offset, pBufBlock->remain); + return ptr; } @@ -324,6 +327,8 @@ static void tsdbFreeBytes(STsdbRepo *pRepo, void *ptr, int bytes) { pBufBlock->offset -= bytes; pBufBlock->remain += bytes; ASSERT(ptr == POINTER_SHIFT(pBufBlock->data, pBufBlock->offset)); + tsdbTrace("vgId:%d return %d bytes to buffer block, nBlocks %d offset %d remain %d", REPO_ID(pRepo), bytes, + listNEles(pRepo->mem->bufBlockList), pBufBlock->offset, pBufBlock->remain); } static SMemTable* tsdbNewMemTable(STsdbCfg* pCfg) { -- GitLab