mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
* enh: add operator reset func * fix: merge join reset issue * fix: memory issues * fix: add debug assert * fix: memory issues * fix: memory leak * fix: memory issues * fix taos log miss * fix: case issue * fix: case issue * fix: case issues * fix: drop dnode issue * fix: memory issues * fix: memory issues * fix: memory leak issues * fix: recalculate time range issue * fix: add debug log * fix: memory issues * fix: enable case asan * Update streamlist_for_ci.task * fix: case asan issue * fix: stream name issue * fix: external window compile issues * fix: deploy memory issue * fix: ahandle issue * fix: ahandle issue * fix: ahandle issue * fix: virtual table reader list issue * fix: log info * fix: msg error * fix: virtual table addr list issue * fix: memory issues * fix: memory leak issue * fix: memory issues * fix: memory free issues * fix: memory issues * fix: snode deploy issue * fix: mnode reader issue * fix: memory issues * fix: add debug test * enh: add ignore nodata trigger * fix: memory leaks * fix: configuration issue * fix: memory issue * fix: external window issue * fix: external window issues * fix: external window placeholder issue * fix: placeholder function init issues * fix: memory leak issue * fix: add debug log * fix: compile issues * fix: double free issue * fix: runner addr update issue * fix: msg rsp issue * fix: external window reset issue * fix: configuration issue * fix: deploy msg issue * fix: compile issue * fix: external window idx issue * fix: ci issues * fix: ci case issues * fix: drop dnode issue * fix: add debug log * fix: conflict * fix: create stream if not exists issue * fix: ahandle memory leak * fix: case issue * fix: exchange issues * fix: crash issue * fix: exchange prefetch issue * fix: snode quit issue * enh: support indef rows func * fix: crash issues * Fix external window collect vector function * fix: external window indef rows issues * fix: external window issue * enh: support count always return value in external window * fix: force output when has more result block * fix: runner block retrieve issue * fix: crash issue * fix: count cases issue * fix: reader deploy message issue * fix: task deploy issue * fix: external window scalar issue * fix: compile issue * fix: group cache reset issue * fix: add protection check * fix: add grant check * fix: add disableStream config * fix: notify free issue * fix: case issue * fix: grant issues * fix: memory leak issue * fix: memory leak issue * fix: memory leak issue * fix: stbJoin issue * fix: rpc send issue * fix: rsp stream group id issue * fix: redeploy stream issue * fix: cases issues --------- Co-authored-by: huohong <sallyhuo@taosdata.com> Co-authored-by: Jing Sima <simondominic9997@outlook.com> Co-authored-by: facetosea <285808407@qq.com>
75 lines
2.4 KiB
C
75 lines
2.4 KiB
C
/*
|
|
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
|
*
|
|
* This program is free software: you can use, redistribute, and/or modify
|
|
* it under the terms of the GNU Affero General Public License, version 3
|
|
* or later ("AGPL"), as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include "mndStream.h"
|
|
#include "mndTrans.h"
|
|
#include "mndMnode.h"
|
|
#include "tmisce.h"
|
|
|
|
|
|
void mndStreamHbSendRsp(SRpcHandleInfo *pRpcInfo, SRpcMsg* pRsp) {
|
|
tmsgSendRsp(pRsp);
|
|
pRpcInfo->handle = NULL; // disable auto rsp
|
|
}
|
|
|
|
int32_t mndProcessStreamHb(SRpcMsg *pReq) {
|
|
SMnode *pMnode = pReq->info.node;
|
|
SStreamHbMsg req = {0};
|
|
SMStreamHbRspMsg rsp = {0};
|
|
int32_t code = 0;
|
|
int32_t lino = 0;
|
|
SDecoder decoder = {0};
|
|
char* msg = POINTER_SHIFT(pReq->pCont, sizeof(SStreamMsgGrpHeader));
|
|
int32_t len = pReq->contLen - sizeof(SStreamMsgGrpHeader);
|
|
int64_t currTs = taosGetTimestampMs();
|
|
SRpcMsg rspMsg = {0};
|
|
|
|
mstDebug("start to process stream hb req msg");
|
|
|
|
rsp.streamGId = req.streamGId;
|
|
|
|
if ((code = grantCheckExpire(TSDB_GRANT_STREAMS)) < 0) {
|
|
TAOS_CHECK_EXIT(msmHandleGrantExpired(pMnode, code));
|
|
}
|
|
|
|
tDecoderInit(&decoder, msg, len);
|
|
code = tDecodeStreamHbMsg(&decoder, &req);
|
|
if (code < 0) {
|
|
mstError("failed to decode stream hb msg, error:%s", tstrerror(terrno));
|
|
tCleanupStreamHbMsg(&req, true);
|
|
tDecoderClear(&decoder);
|
|
TAOS_CHECK_EXIT(TSDB_CODE_INVALID_MSG);
|
|
}
|
|
tDecoderClear(&decoder);
|
|
|
|
mstDebug("start to process grp %d stream-hb from dnode:%d, snodeId:%d, vgLeaders:%d, streamStatus:%d",
|
|
req.streamGId, req.dnodeId, req.snodeId, (int32_t)taosArrayGetSize(req.pVgLeaders), (int32_t)taosArrayGetSize(req.pStreamStatus));
|
|
|
|
(void)msmHandleStreamHbMsg(pMnode, currTs, &req, pReq, &rspMsg);
|
|
|
|
_exit:
|
|
|
|
if (code) {
|
|
msmEncodeStreamHbRsp(code, &pReq->info, &rsp, &rspMsg);
|
|
}
|
|
|
|
mndStreamHbSendRsp(&pReq->info, &rspMsg);
|
|
tCleanupStreamHbMsg(&req, true);
|
|
tFreeSMStreamHbRspMsg(&rsp);
|
|
|
|
mstDebug("end to process stream hb req msg, code:%d", code);
|
|
|
|
return code;
|
|
}
|