提交 c068b1b0 编写于 作者: S slzhou

enhance: log submit that takes more than 10s with error

上级 f88270f0
...@@ -160,7 +160,7 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR ...@@ -160,7 +160,7 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR
int32_t code = TSDB_CODE_SUCCESS; int32_t code = TSDB_CODE_SUCCESS;
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 +186,11 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR ...@@ -186,6 +186,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) {
vError("vgId: %d, insert msg 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.
先完成此消息的编辑!
想要评论请 注册