From 6825d2a143047fc933e0bbd564dbfcf0950aeadb Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Sun, 9 Oct 2022 13:55:14 +0800 Subject: [PATCH] alter vnode buffer --- source/dnode/vnode/src/vnd/vnodeCommit.c | 4 ++-- source/dnode/vnode/src/vnd/vnodeSvr.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/dnode/vnode/src/vnd/vnodeCommit.c b/source/dnode/vnode/src/vnd/vnodeCommit.c index 8c73499229..6dc3ef86a7 100644 --- a/source/dnode/vnode/src/vnd/vnodeCommit.c +++ b/source/dnode/vnode/src/vnd/vnodeCommit.c @@ -73,7 +73,7 @@ int vnodeBegin(SVnode *pVnode) { int vnodeShouldCommit(SVnode *pVnode) { if (pVnode->inUse) { - return pVnode->inUse->size > pVnode->config.szBuf / 3; + return pVnode->inUse->size > pVnode->inUse->node.size; } return false; } @@ -236,7 +236,7 @@ int vnodeCommit(SVnode *pVnode) { // preCommit // smaSyncPreCommit(pVnode->pSma); - if(smaAsyncPreCommit(pVnode->pSma) < 0){ + if (smaAsyncPreCommit(pVnode->pSma) < 0) { ASSERT(0); return -1; } diff --git a/source/dnode/vnode/src/vnd/vnodeSvr.c b/source/dnode/vnode/src/vnd/vnodeSvr.c index aea68cd462..b6afe4d087 100644 --- a/source/dnode/vnode/src/vnd/vnodeSvr.c +++ b/source/dnode/vnode/src/vnd/vnodeSvr.c @@ -1041,6 +1041,8 @@ static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t version, void } if (pVnode->config.szBuf != alterReq.buffer * 1024LL * 1024LL) { + vInfo("vgId:%d vnode buffer is changed from %" PRId64 " to %" PRId64, TD_VID(pVnode), pVnode->config.szBuf, + alterReq.buffer * 1024LL * 1024LL); pVnode->config.szBuf = alterReq.buffer * 1024LL * 1024LL; }