Merge remote-tracking branch 'origin/main' into doc/contrib
This commit is contained in:
commit
4f7975f1a1
|
@ -156,8 +156,8 @@ charset 的有效值是 UTF-8。
|
||||||
### 内存相关
|
### 内存相关
|
||||||
| 参数名称 | 参数说明 |
|
| 参数名称 | 参数说明 |
|
||||||
| :----------------: | :---------------------------------------------: |
|
| :----------------: | :---------------------------------------------: |
|
||||||
| rpcQueueMemoryAllowed | 一个 dnode 允许的 rpc 消息占用的内存最大值,单位 bytes,取值范围:10485760-INT64_MAX,缺省值:服务器内存的 1/10 |
|
| rpcQueueMemoryAllowed | 一个 dnode 允许的 rpc 消息占用的内存最大值,单位 bytes,取值范围:104857600-INT64_MAX,缺省值:服务器内存的 1/10 |
|
||||||
| syncLogBufferMemoryAllowed | 一个 dnode 允许的 sync 日志缓存消息占用的内存最大值,单位 bytes,取值范围:10485760-INT64_MAX,缺省值:服务器内存的 1/10,3.1.3.2/3.3.2.13 版本开始生效 |
|
| syncLogBufferMemoryAllowed | 一个 dnode 允许的 sync 日志缓存消息占用的内存最大值,单位 bytes,取值范围:104857600-INT64_MAX,缺省值:服务器内存的 1/10,3.1.3.2/3.3.2.13 版本开始生效 |
|
||||||
|
|
||||||
### 性能调优
|
### 性能调优
|
||||||
|
|
||||||
|
|
|
@ -316,12 +316,13 @@ int32_t createMetaHbInfo(int64_t* pRid, SMetaHbInfo** pRes) {
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
streamTmrStart(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, pRid, streamTimer, &pInfo->hbTmr, 0, "stream-hb");
|
|
||||||
pInfo->tickCounter = 0;
|
pInfo->tickCounter = 0;
|
||||||
pInfo->msgSendTs = -1;
|
pInfo->msgSendTs = -1;
|
||||||
pInfo->hbCount = 0;
|
pInfo->hbCount = 0;
|
||||||
|
|
||||||
*pRes = pInfo;
|
*pRes = pInfo;
|
||||||
|
|
||||||
|
streamTmrStart(streamMetaHbToMnode, META_HB_CHECK_INTERVAL, pRid, streamTimer, &pInfo->hbTmr, 0, "stream-hb");
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -434,7 +434,6 @@ int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn,
|
||||||
pMeta->closeFlag = false;
|
pMeta->closeFlag = false;
|
||||||
|
|
||||||
stInfo("vgId:%d open stream meta succ, latest checkpoint:%" PRId64 ", stage:%" PRId64, vgId, pMeta->chkpId, stage);
|
stInfo("vgId:%d open stream meta succ, latest checkpoint:%" PRId64 ", stage:%" PRId64, vgId, pMeta->chkpId, stage);
|
||||||
pMeta->rid = taosAddRef(streamMetaId, pMeta);
|
|
||||||
|
|
||||||
// set the attribute when running on Linux OS
|
// set the attribute when running on Linux OS
|
||||||
TdThreadRwlockAttr attr;
|
TdThreadRwlockAttr attr;
|
||||||
|
@ -452,22 +451,27 @@ int32_t streamMetaOpen(const char* path, void* ahandle, FTaskBuild buildTaskFn,
|
||||||
code = taosThreadRwlockAttrDestroy(&attr);
|
code = taosThreadRwlockAttrDestroy(&attr);
|
||||||
TSDB_CHECK_CODE(code, lino, _err);
|
TSDB_CHECK_CODE(code, lino, _err);
|
||||||
|
|
||||||
int64_t* pRid = taosMemoryMalloc(sizeof(int64_t));
|
|
||||||
TSDB_CHECK_NULL(pRid, code, lino, _err, terrno);
|
|
||||||
|
|
||||||
memcpy(pRid, &pMeta->rid, sizeof(pMeta->rid));
|
|
||||||
code = metaRefMgtAdd(pMeta->vgId, pRid);
|
|
||||||
TSDB_CHECK_CODE(code, lino, _err);
|
|
||||||
|
|
||||||
code = createMetaHbInfo(pRid, &pMeta->pHbInfo);
|
|
||||||
TSDB_CHECK_CODE(code, lino, _err);
|
|
||||||
|
|
||||||
code = bkdMgtCreate(tpath, (SBkdMgt**)&pMeta->bkdChkptMgt);
|
code = bkdMgtCreate(tpath, (SBkdMgt**)&pMeta->bkdChkptMgt);
|
||||||
TSDB_CHECK_CODE(code, lino, _err);
|
TSDB_CHECK_CODE(code, lino, _err);
|
||||||
|
|
||||||
code = taosThreadMutexInit(&pMeta->backendMutex, NULL);
|
code = taosThreadMutexInit(&pMeta->backendMutex, NULL);
|
||||||
TSDB_CHECK_CODE(code, lino, _err);
|
TSDB_CHECK_CODE(code, lino, _err);
|
||||||
|
|
||||||
|
// add refId at the end of initialization function
|
||||||
|
pMeta->rid = taosAddRef(streamMetaId, pMeta);
|
||||||
|
|
||||||
|
int64_t* pRid = taosMemoryMalloc(sizeof(int64_t));
|
||||||
|
TSDB_CHECK_NULL(pRid, code, lino, _err, terrno);
|
||||||
|
|
||||||
|
memcpy(pRid, &pMeta->rid, sizeof(pMeta->rid));
|
||||||
|
|
||||||
|
code = metaRefMgtAdd(pMeta->vgId, pRid);
|
||||||
|
TSDB_CHECK_CODE(code, lino, _err);
|
||||||
|
|
||||||
|
code = createMetaHbInfo(pRid, &pMeta->pHbInfo);
|
||||||
|
|
||||||
|
TSDB_CHECK_CODE(code, lino, _err);
|
||||||
|
|
||||||
*p = pMeta;
|
*p = pMeta;
|
||||||
return code;
|
return code;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue