• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

taosdata / TDengine / #4672

14 Aug 2025 01:04PM UTC coverage: 59.715% (+2.2%) from 57.533%
#4672

push

travis-ci

web-flow
fix(query): fix order by column check of union operator (#32524)

137065 of 292055 branches covered (46.93%)

Branch coverage included in aggregate %.

1 of 13 new or added lines in 1 file covered. (7.69%)

20958 existing lines in 205 files now uncovered.

207155 of 284385 relevant lines covered (72.84%)

20501687.34 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.73
/source/dnode/mnode/impl/src/mndStreamHb.c
1
/*
2
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
3
 *
4
 * This program is free software: you can use, redistribute, and/or modify
5
 * it under the terms of the GNU Affero General Public License, version 3
6
 * or later ("AGPL"), as published by the Free Software Foundation.
7
 *
8
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
 * FITNESS FOR A PARTICULAR PURPOSE.
11
 *
12
 * You should have received a copy of the GNU Affero General Public License
13
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14
 */
15

16
#include "mndStream.h"
17
#include "mndTrans.h"
18
#include "mndMnode.h"
19
#include "tmisce.h"
20

21

22
void mndStreamHbSendRsp(SRpcHandleInfo *pRpcInfo, SRpcMsg* pRsp) {
173,359✔
23
  tmsgSendRsp(pRsp);
173,359✔
24
  pRpcInfo->handle = NULL;  // disable auto rsp
173,359✔
25
}
173,359✔
26

27
int32_t mndProcessStreamHb(SRpcMsg *pReq) {
173,359✔
28
  SMnode      *pMnode = pReq->info.node;
173,359✔
29
  SStreamHbMsg req = {0};
173,359✔
30
  SMStreamHbRspMsg rsp = {0};
173,359✔
31
  int32_t      code = 0;
173,359✔
32
  int32_t      lino = 0;
173,359✔
33
  SDecoder     decoder = {0};
173,359✔
34
  char*        msg = POINTER_SHIFT(pReq->pCont, sizeof(SStreamMsgGrpHeader));
173,359✔
35
  int32_t      len = pReq->contLen - sizeof(SStreamMsgGrpHeader);
173,359✔
36
  int64_t      currTs = taosGetTimestampMs();
173,359✔
37
  SRpcMsg      rspMsg = {0};
173,359✔
38

39
  mstDebug("start to process stream hb req msg");
173,359✔
40

41
  rsp.streamGId = req.streamGId;
173,359✔
42

43
  if ((code = grantCheckExpire(TSDB_GRANT_STREAMS)) < 0) {
173,359!
UNCOV
44
    TAOS_CHECK_EXIT(msmHandleGrantExpired(pMnode, code));
×
45
  }
46

47
  tDecoderInit(&decoder, msg, len);
173,359✔
48
  code = tDecodeStreamHbMsg(&decoder, &req);
173,359✔
49
  if (code < 0) {
173,359!
50
    mstError("failed to decode stream hb msg, error:%s", tstrerror(terrno));
×
UNCOV
51
    tCleanupStreamHbMsg(&req, true);
×
UNCOV
52
    tDecoderClear(&decoder);
×
UNCOV
53
    TAOS_CHECK_EXIT(TSDB_CODE_INVALID_MSG);
×
54
  }
55
  tDecoderClear(&decoder);
173,359✔
56

57
  mstDebug("start to process grp %d stream-hb from dnode:%d, snodeId:%d, vgLeaders:%d, streamStatus:%d", 
173,359✔
58
      req.streamGId, req.dnodeId, req.snodeId, (int32_t)taosArrayGetSize(req.pVgLeaders), (int32_t)taosArrayGetSize(req.pStreamStatus));
59

60
  (void)msmHandleStreamHbMsg(pMnode, currTs, &req, pReq, &rspMsg);
173,359✔
61

62
_exit:
173,359✔
63

64
  if (code) {
173,359!
UNCOV
65
    msmEncodeStreamHbRsp(code, &pReq->info, &rsp, &rspMsg);
×
66
  }
67
  
68
  mndStreamHbSendRsp(&pReq->info, &rspMsg);
173,359✔
69
  tCleanupStreamHbMsg(&req, true);
173,359✔
70
  tFreeSMStreamHbRspMsg(&rsp);
173,359✔
71

72
  mstDebug("end to process stream hb req msg, code:%d", code);
173,359✔
73

74
  return code;
173,359✔
75
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc