diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index 3f4639a9dc57eff583e40a0f8527abc4db703bc5..97306f2da06051f1bfe598e2df27d9021c4df988 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -48,7 +48,7 @@ bool tsPrintAuth = 0; // multi process bool tsMultiProcess = false; -int32_t tsMnodeShmSize = TSDB_MAX_WAL_SIZE * 1; +int32_t tsMnodeShmSize = TSDB_MAX_WAL_SIZE * 2; int32_t tsVnodeShmSize = TSDB_MAX_WAL_SIZE * 10; int32_t tsQnodeShmSize = TSDB_MAX_WAL_SIZE * 4; int32_t tsSnodeShmSize = TSDB_MAX_WAL_SIZE * 4; @@ -485,7 +485,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) { tsVnodeShmSize = cfgGetItem(pCfg, "vnodeShmSize")->i32; tsQnodeShmSize = cfgGetItem(pCfg, "qnodeShmSize")->i32; tsSnodeShmSize = cfgGetItem(pCfg, "snodeShmSize")->i32; - tsBnodeShmSize = cfgGetItem(pCfg, "bnodeShmSize")->i32; + // tsBnodeShmSize = cfgGetItem(pCfg, "bnodeShmSize")->i32; tsEnableMonitor = cfgGetItem(pCfg, "monitor")->bval; tsMonitorInterval = cfgGetItem(pCfg, "monitorInterval")->i32; diff --git a/source/dnode/mgmt/main/dndExec.c b/source/dnode/mgmt/main/dndExec.c index 6976b318c65a670f5e9a868835dd4b89a2e59d4c..28b24e97c97a20bbac4b68a3fbac2047c0b59e3c 100644 --- a/source/dnode/mgmt/main/dndExec.c +++ b/source/dnode/mgmt/main/dndExec.c @@ -147,7 +147,20 @@ static int32_t dndRunInParentProcess(SDnode *pDnode) { pWrapper->required = dndRequireNode(pWrapper); if (!pWrapper->required) continue; - int32_t shmsize = 1024 * 1024 * 2; // size will be a configuration item + int32_t shmsize = tsMnodeShmSize; + if (n == VNODES) { + shmsize = tsVnodeShmSize; + } else if (n == QNODE) { + shmsize = tsQnodeShmSize; + } else if (n == SNODE) { + shmsize = tsSnodeShmSize; + } else if (n == MNODE) { + shmsize = tsMnodeShmSize; + } else if (n == BNODE) { + shmsize = tsBnodeShmSize; + } else { + } + if (taosCreateShm(&pWrapper->shm, n, shmsize) != 0) { terrno = TAOS_SYSTEM_ERROR(terrno); dError("node:%s, failed to create shm size:%d since %s", pWrapper->name, shmsize, terrstr()); diff --git a/source/util/src/tprocess.c b/source/util/src/tprocess.c index ad7ed51d4e496a1add1e112b73f0f7713db99733..2cafd3f7f6c9b6f9916f6314788a06e8346982ef 100644 --- a/source/util/src/tprocess.c +++ b/source/util/src/tprocess.c @@ -256,7 +256,7 @@ static int32_t taosProcQueuePop(SProcQueue *pQueue, void **ppHead, int16_t *pHea rawBodyLen = *(int32_t *)(pQueue->pBuffer + 4); } int16_t headLen = CEIL8(rawHeadLen); - int16_t bodyLen = CEIL8(rawBodyLen); + int32_t bodyLen = CEIL8(rawBodyLen); void *pHead = (*mallocHeadFp)(headLen); void *pBody = (*mallocBodyFp)(bodyLen);