From 6bf4614bfa0fbaa6fcf13024ef4f25b4b0d96677 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Thu, 20 Jan 2022 15:25:13 +0800 Subject: [PATCH] revert and remove allocator --- source/dnode/vnode/src/tq/tq.c | 6 +++++- source/dnode/vnode/src/vnd/vnodeMain.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/tq/tq.c b/source/dnode/vnode/src/tq/tq.c index 2b2272caea..ad71005153 100644 --- a/source/dnode/vnode/src/tq/tq.c +++ b/source/dnode/vnode/src/tq/tq.c @@ -58,15 +58,19 @@ STQ* tqOpen(const char* path, STqCfg* tqConfig, SMemAllocatorFactory* allocFac) } pTq->path = strdup(path); pTq->tqConfig = tqConfig; +#if 0 pTq->tqMemRef.pAllocatorFactory = allocFac; pTq->tqMemRef.pAllocator = allocFac->create(allocFac); if (pTq->tqMemRef.pAllocator == NULL) { // TODO: error code of buffer pool } +#endif pTq->tqMeta = tqStoreOpen(path, (FTqSerialize)tqSerializeGroup, (FTqDeserialize)tqDeserializeGroup, free, 0); if (pTq->tqMeta == NULL) { - allocFac->destroy(allocFac, pTq->tqMemRef.pAllocator); free(pTq); +#if 0 + allocFac->destroy(allocFac, pTq->tqMemRef.pAllocator); +#endif return NULL; } diff --git a/source/dnode/vnode/src/vnd/vnodeMain.c b/source/dnode/vnode/src/vnd/vnodeMain.c index cb0d76ed29..fd79341adf 100644 --- a/source/dnode/vnode/src/vnd/vnodeMain.c +++ b/source/dnode/vnode/src/vnd/vnodeMain.c @@ -117,7 +117,7 @@ static int vnodeOpenImpl(SVnode *pVnode) { return -1; } - // TODO: Open TQ + // Open TQ sprintf(dir, "%s/tq", pVnode->path); pVnode->pTq = tqOpen(dir, &(pVnode->config.tqCfg), vBufPoolGetMAF(pVnode)); if (pVnode->pTq == NULL) { -- GitLab