未验证 提交 8f6f5bd2 编写于 作者: X Xiaoyu Wang 提交者: GitHub

Merge pull request #20085 from taosdata/fix/TD-22618

fix:pDnode is null when server init
...@@ -93,18 +93,30 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) { ...@@ -93,18 +93,30 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
break; break;
} }
if (pDnode->status != DND_STAT_RUNNING) { /*
if (pRpc->msgType == TDMT_DND_SERVER_STATUS) { pDnode is null, TD-22618
dmProcessServerStartupStatus(pDnode, pRpc); at trans.c line 91
return; before this line, dmProcessRpcMsg callback is set
} else { after this line, parent is set
if (pDnode->status == DND_STAT_INIT) { so when dmProcessRpcMsg is called, pDonde is still null.
terrno = TSDB_CODE_APP_IS_STARTING; */
if (pDnode != NULL){
if(pDnode->status != DND_STAT_RUNNING) {
if (pRpc->msgType == TDMT_DND_SERVER_STATUS) {
dmProcessServerStartupStatus(pDnode, pRpc);
return;
} else { } else {
terrno = TSDB_CODE_APP_IS_STOPPING; if (pDnode->status == DND_STAT_INIT) {
terrno = TSDB_CODE_APP_IS_STARTING;
} else {
terrno = TSDB_CODE_APP_IS_STOPPING;
}
goto _OVER;
} }
goto _OVER; }
} } else {
terrno = TSDB_CODE_APP_IS_STARTING;
goto _OVER;
} }
if (pRpc->pCont == NULL && (IsReq(pRpc) || pRpc->contLen != 0)) { if (pRpc->pCont == NULL && (IsReq(pRpc) || pRpc->contLen != 0)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册