alter vnode buffer

This commit is contained in:
Hongze Cheng 2022-10-09 13:55:14 +08:00
parent ee56c50069
commit 6825d2a143
2 changed files with 4 additions and 2 deletions

View File

@ -73,7 +73,7 @@ int vnodeBegin(SVnode *pVnode) {
int vnodeShouldCommit(SVnode *pVnode) { int vnodeShouldCommit(SVnode *pVnode) {
if (pVnode->inUse) { if (pVnode->inUse) {
return pVnode->inUse->size > pVnode->config.szBuf / 3; return pVnode->inUse->size > pVnode->inUse->node.size;
} }
return false; return false;
} }
@ -236,7 +236,7 @@ int vnodeCommit(SVnode *pVnode) {
// preCommit // preCommit
// smaSyncPreCommit(pVnode->pSma); // smaSyncPreCommit(pVnode->pSma);
if(smaAsyncPreCommit(pVnode->pSma) < 0){ if (smaAsyncPreCommit(pVnode->pSma) < 0) {
ASSERT(0); ASSERT(0);
return -1; return -1;
} }

View File

@ -1041,6 +1041,8 @@ static int32_t vnodeProcessAlterConfigReq(SVnode *pVnode, int64_t version, void
} }
if (pVnode->config.szBuf != alterReq.buffer * 1024LL * 1024LL) { 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; pVnode->config.szBuf = alterReq.buffer * 1024LL * 1024LL;
} }