未验证 提交 0f5101ca 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #17471 from taosdata/szhou/fixbugs26

enhance: log submit that take more than 10s with warning
...@@ -161,6 +161,8 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR ...@@ -161,6 +161,8 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR
vTrace("vgId:%d, submit msg is processed", pVnode->vgId); vTrace("vgId:%d, submit msg is processed", pVnode->vgId);
int64_t submitStartUs = taosGetTimestampUs();
if (pVnode->dbType == TSDB_DB_TYPE_TOPIC && pVnode->role == TAOS_SYNC_ROLE_MASTER) { if (pVnode->dbType == TSDB_DB_TYPE_TOPIC && pVnode->role == TAOS_SYNC_ROLE_MASTER) {
tpUpdateTs(pVnode->vgId, &pVnode->sequence, pCont); tpUpdateTs(pVnode->vgId, &pVnode->sequence, pCont);
} }
...@@ -186,6 +188,11 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR ...@@ -186,6 +188,11 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR
atomic_fetch_add_64(&tsSubmitRowSucNum, ntohl(pRsp->affectedRows)); atomic_fetch_add_64(&tsSubmitRowSucNum, ntohl(pRsp->affectedRows));
} }
int64_t submitEndUs = taosGetTimestampUs();
if (submitEndUs - submitStartUs > 10 * 1000000) {
vWarn("vgId: %d, submit msg process takes more than 10s", pVnode->vgId);
}
return code; return code;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册