diff --git a/src/vnode/src/vnodeWrite.c b/src/vnode/src/vnodeWrite.c index e3371c79db76f4a3875b505aa7f56c67969c49ce..be5b43caf3172d7f6e9e45ae728eb55d08396724 100644 --- a/src/vnode/src/vnodeWrite.c +++ b/src/vnode/src/vnodeWrite.c @@ -161,6 +161,8 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR 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) { tpUpdateTs(pVnode->vgId, &pVnode->sequence, pCont); } @@ -186,6 +188,11 @@ static int32_t vnodeProcessSubmitMsg(SVnodeObj *pVnode, void *pCont, SRspRet *pR 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; }