From fda6fccac837219ad926c3a9ac50f009516a5b81 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 9 Jan 2023 09:24:26 +0800 Subject: [PATCH] more code --- source/dnode/vnode/src/inc/vnodeInt.h | 4 +++- source/dnode/vnode/src/vnd/vnodeBufPool.c | 4 ---- source/dnode/vnode/src/vnd/vnodeCommit.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/source/dnode/vnode/src/inc/vnodeInt.h b/source/dnode/vnode/src/inc/vnodeInt.h index dd5e6fc575..6fb6802966 100644 --- a/source/dnode/vnode/src/inc/vnodeInt.h +++ b/source/dnode/vnode/src/inc/vnodeInt.h @@ -341,7 +341,9 @@ struct SVnode { SVBufPool* aBufPool[VNODE_BUFPOOL_SEGMENTS]; SVBufPool* freeList; SVBufPool* inUse; - SVBufPool* recycling; + SVBufPool* onCommit; + SVBufPool* recycleHead; + SVBufPool* recycleTail; SMeta* pMeta; SSma* pSma; diff --git a/source/dnode/vnode/src/vnd/vnodeBufPool.c b/source/dnode/vnode/src/vnd/vnodeBufPool.c index 8b6247163a..3ae5755b49 100644 --- a/source/dnode/vnode/src/vnd/vnodeBufPool.c +++ b/source/dnode/vnode/src/vnd/vnodeBufPool.c @@ -94,10 +94,6 @@ int vnodeCloseBufPool(SVnode *pVnode) { } } - pVnode->freeList = NULL; - ASSERT(pVnode->inUse == NULL); - ASSERT(pVnode->recycling == NULL); - vDebug("vgId:%d, vnode buffer pool is closed", TD_VID(pVnode)); return 0; } diff --git a/source/dnode/vnode/src/vnd/vnodeCommit.c b/source/dnode/vnode/src/vnd/vnodeCommit.c index 4114651904..4f28199105 100644 --- a/source/dnode/vnode/src/vnd/vnodeCommit.c +++ b/source/dnode/vnode/src/vnd/vnodeCommit.c @@ -29,7 +29,7 @@ int vnodeBegin(SVnode *pVnode) { int32_t nTry = 0; for (;;) { - while (pVnode->freeList == NULL) { + while (pVnode->freeList == NULL) { // move here below vDebug("vgId:%d no free buffer pool, try to wait %d...", TD_VID(pVnode), ++nTry); struct timeval tv; -- GitLab