From 078e13b3aa47c95a71a64900cc638ba7fbd37900 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 16 Nov 2021 15:49:05 +0800 Subject: [PATCH] merge --- source/dnode/vnode/impl/src/vnodeMain.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/impl/src/vnodeMain.c b/source/dnode/vnode/impl/src/vnodeMain.c index 6c0fe9c974..f9efb88bd9 100644 --- a/source/dnode/vnode/impl/src/vnodeMain.c +++ b/source/dnode/vnode/impl/src/vnodeMain.c @@ -110,6 +110,20 @@ static int vnodeOpenImpl(SVnode *pVnode) { } // TODO: Open TQ + sprintf(dir, "%s/wal", pVnode->path); + pVnode->pTq = tqOpen(dir, NULL /* TODO */); + if (pVnode->pTq == NULL) { + // TODO: handle error + return -1; + } + + // Open WAL + sprintf(dir, "%s/wal", pVnode->path); + pVnode->pWal = walOpen(dir, NULL /* TODO */); + if (pVnode->pWal == NULL) { + // TODO: handle error + return -1; + } // TODO return 0; @@ -117,8 +131,9 @@ static int vnodeOpenImpl(SVnode *pVnode) { static void vnodeCloseImpl(SVnode *pVnode) { if (pVnode) { - vnodeCloseAllocatorPool(pVnode); - // TODO: Close TQ + vnodeCloseBufPool(pVnode); + walClose(pVnode->pWal); + tqClose(pVnode->pTq); tsdbClose(pVnode->pTsdb); metaClose(pVnode->pMeta); }