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

taosdata / TDengine / #5016

03 Apr 2026 03:59PM UTC coverage: 72.299% (+0.01%) from 72.289%
#5016

push

travis-ci

web-flow
merge: from main to 3.0 branch #35067

4055 of 5985 new or added lines in 68 files covered. (67.75%)

13126 existing lines in 156 files now uncovered.

257424 of 356056 relevant lines covered (72.3%)

133108577.02 hits per line

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

80.24
/source/dnode/snode/src/snode.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 "executor.h"
17
#include "sndInt.h"
18
#include "stream.h"
19
#include "streamRunner.h"
20
#include "tdatablock.h"
21
#include "tuuid.h"
22

23
// clang-format off
24
#define sndError(...) do {  if (sndDebugFlag & DEBUG_ERROR) { taosPrintLog("SND ERROR ", DEBUG_ERROR, sndDebugFlag, __VA_ARGS__);}} while (0)
25
#define sndInfo(...)  do {  if (sndDebugFlag & DEBUG_INFO)  { taosPrintLog("SND INFO  ", DEBUG_INFO,  sndDebugFlag, __VA_ARGS__);}} while (0)
26
#define sndDebug(...) do {  if (sndDebugFlag & DEBUG_DEBUG) { taosPrintLog("SND DEBUG ", DEBUG_DEBUG, sndDebugFlag, __VA_ARGS__);}} while (0)
27

28
SSnode *sndOpen(const char *path, const SSnodeOpt *pOption) {
72,846✔
29
  int32_t code = 0;
72,846✔
30
  SSnode *pSnode = taosMemoryCalloc(1, sizeof(SSnode));
72,846✔
31
  if (pSnode == NULL) {
72,846✔
32
    return NULL;
×
33
  }
34

35
  pSnode->msgCb = pOption->msgCb;
72,846✔
36

37
  return pSnode;
72,846✔
38
}
39

40
int32_t sndInit(SSnode *pSnode) {
72,846✔
41
  streamSetSnodeEnabled(&pSnode->msgCb);
72,846✔
42
  return 0;
72,846✔
43
}
44

45
void sndClose(SSnode *pSnode) {
72,846✔
46
  streamSetSnodeDisabled(false);
72,846✔
47
  taosMemoryFree(pSnode);
72,846✔
48
}
72,846✔
49

50
static int32_t handleTriggerCalcReq(SSnode* pSnode, void* pWorkerCb, SRpcMsg* pRpcMsg) {
3,489,344✔
51
  SSTriggerCalcRequest req = {0};
3,489,344✔
52
  SStreamRunnerTask* pTask = NULL;
3,489,344✔
53
  void* taskAddr = NULL;
3,489,126✔
54
  int32_t code = 0, lino = 0;
3,489,126✔
55
  TAOS_CHECK_EXIT(tDeserializeSTriggerCalcRequest(POINTER_SHIFT(pRpcMsg->pCont, sizeof(SMsgHead)), pRpcMsg->contLen - sizeof(SMsgHead), &req));
3,489,126✔
56
  TAOS_CHECK_EXIT(streamAcquireTask(req.streamId, req.runnerTaskId, (SStreamTask**)&pTask, &taskAddr));
3,489,126✔
57

58
  req.brandNew = true;
3,489,092✔
59
  req.execId = -1;
3,489,092✔
60
  pTask->msgCb = pSnode->msgCb;
3,489,092✔
61
  //pTask->pMsgCb = &pSnode->msgCb;
62
  pTask->pWorkerCb = pWorkerCb;
3,489,092✔
63
  req.curWinIdx = 0;
3,489,092✔
64
  TAOS_CHECK_EXIT(stRunnerTaskExecute(pTask, &req));
3,489,092✔
65

66
_exit:
2,897,522✔
67

68
  tDestroySTriggerCalcRequest(&req);
3,489,344✔
69
  SRpcMsg rsp = {.code = code, .msgType = TDMT_STREAM_TRIGGER_CALC_RSP, .contLen = 0, .pCont = NULL, .info = pRpcMsg->info};
3,489,344✔
70
  if (rpcSendResponse(&rsp) != 0) {
3,489,115✔
71
    sndError("failed to send response, msg:%p", &rsp);
×
72
  }
73
  
74
  streamReleaseTask(taskAddr);
3,489,105✔
75

76
  if(code == TSDB_CODE_MND_STREAM_TABLE_NOT_CREATE) {
3,489,126✔
77
    code = 0; // not real error, just notify trigger the table is not created
×
78
  }
79

80
  if (code) {
3,489,126✔
81
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
2,562,024✔
82
  }
83
  
84
  return code;
3,489,344✔
85
}
86

87
static int32_t handleSyncDeleteCheckPointReq(SSnode* pSnode, SRpcMsg* pRpcMsg) {
3,101✔
88
  int64_t streamId = *(int64_t*)POINTER_SHIFT(pRpcMsg->pCont, sizeof(SMsgHead));
3,101✔
89
  streamDeleteCheckPoint(streamId);
3,101✔
90
  return 0;
3,101✔
91
}
92

93
static int32_t handleSyncWriteCheckPointReq(SSnode* pSnode, SRpcMsg* pRpcMsg) {
6,478✔
94
  int32_t ver = *(int32_t*)POINTER_SHIFT(pRpcMsg->pCont, sizeof(SMsgHead) + INT_BYTES);
6,478✔
95
  int64_t streamId = *(int64_t*)POINTER_SHIFT(pRpcMsg->pCont, sizeof(SMsgHead) + 2 * INT_BYTES);
6,478✔
96
  SRpcMsg rsp = {.code = 0, .msgType = TDMT_STREAM_SYNC_CHECKPOINT_RSP, .info = pRpcMsg->info};
6,478✔
97

98
  stDebug("[checkpoint] handleSyncWriteCheckPointReq streamId:%" PRIx64 ",ver:%d", streamId, ver);
6,478✔
99
  void*   data = NULL;
6,478✔
100
  int64_t dataLen = 0;
6,478✔
101
  int32_t code = streamReadCheckPoint(streamId, &data, &dataLen);
6,478✔
102
  if (code != 0 || (errorIsFileNotExist(terrno) && ver == -1)) {
6,478✔
103
    goto end;
3,882✔
104
  }
105
  if (errorIsFileNotExist(terrno) || ver > *(int32_t*)POINTER_SHIFT(data, INT_BYTES)) {
2,596✔
106
    int32_t ret = streamWriteCheckPoint(streamId, POINTER_SHIFT(pRpcMsg->pCont, sizeof(SMsgHead)), pRpcMsg->contLen - sizeof(SMsgHead));
1,668✔
107
    stDebug("[checkpoint] streamId:%" PRIx64 ", checkpoint local updated, ver:%d, dataLen:%" PRId64 ", ret:%d", streamId, ver, dataLen, ret);
1,668✔
108
  }
109
  if (errorIsFileNotExist(terrno) || ver >= *(int32_t*)POINTER_SHIFT(data, INT_BYTES)) {
2,596✔
110
    stDebug("[checkpoint] streamId:%" PRIx64 ", checkpoint no need send back, ver:%d, dataLen:%" PRId64, streamId, ver, dataLen);
2,410✔
111
    dataLen = 0;
2,410✔
112
    taosMemoryFreeClear(data);
2,410✔
113
  }
114
  
115
end:
6,478✔
116
  if (data == NULL) {
6,478✔
117
    rsp.contLen = 2 * INT_BYTES + LONG_BYTES;
6,292✔
118
    rsp.pCont = rpcMallocCont(rsp.contLen);
6,292✔
119
    if (rsp.pCont == NULL) {
6,292✔
120
      rsp.code = TSDB_CODE_OUT_OF_MEMORY;
×
121
    } else {
122
      *(int32_t*)(POINTER_SHIFT(rsp.pCont, INT_BYTES)) = -1;  // no checkpoint
6,292✔
123
      *(int64_t*)(POINTER_SHIFT(rsp.pCont, 2 * INT_BYTES)) = streamId;
6,292✔
124
    }
125
  } else {
126
    rsp.pCont = rpcMallocCont(dataLen);
186✔
127
    if (rsp.pCont == NULL) {
186✔
128
      rsp.code = TSDB_CODE_OUT_OF_MEMORY;
×
129
    } else {
130
      memcpy(rsp.pCont, data, dataLen);
186✔
131
      rsp.contLen = dataLen;
186✔
132
      taosMemoryFreeClear(data); 
186✔
133
    } 
134
  }
135
  
136
  if (rpcSendResponse(&rsp) != 0) {
6,478✔
137
    sndError("failed to send write checkpoint response, msg:%p", &rsp);
×
138
  }
139

140
  return 0;
6,478✔
141
}
142

143
static int32_t handleSyncWriteCheckPointRsp(SSnode* pSnode, SRpcMsg* pRpcMsg) {
6,501✔
144
  if (pRpcMsg->code != 0) {
6,501✔
145
    stError("[checkpoint] handleSyncWriteCheckPointRsp, code:%d, msgType:%d", pRpcMsg->code, pRpcMsg->msgType);
×
146
    return pRpcMsg->code;
×
147
  } 
148
  void* data = pRpcMsg->pCont;
6,501✔
149
  int32_t dataLen = pRpcMsg->contLen;
6,501✔
150
  
151
  int32_t ver = *(int32_t*)(POINTER_SHIFT(data, INT_BYTES));
6,501✔
152
  int64_t streamId = *(int64_t*)(POINTER_SHIFT(data, 2 * INT_BYTES));
6,501✔
153
  stDebug("[checkpoint] handleSyncWriteCheckPointRsp, ver:%d, streamId:%"PRIx64",dataLen:%d", 
6,501✔
154
    ver, streamId, dataLen);
155

156
  if (ver != -1){
6,501✔
157
    (void)streamWriteCheckPoint(streamId, data, dataLen);
185✔
158
  }
159
  return streamCheckpointSetReady(streamId);
6,501✔
160
}
161

162
static int32_t buildStreamFetchRsp(SSDataBlock* pBlock, void** data, size_t* size, int8_t precision, bool finished) {
7,691,584✔
163
  int32_t code = 0;
7,691,584✔
164
  int32_t lino = 0;
7,691,584✔
165
  void*   buf =  NULL;
7,691,584✔
166

167
  int32_t blockSize = pBlock == NULL ? 0 : blockGetInternalEncodeSize(pBlock);
7,691,584✔
168
  size_t dataEncodeBufSize = sizeof(SRetrieveTableRsp) + INT_BYTES * 2 + blockSize;
7,691,584✔
169
  buf = rpcMallocCont(dataEncodeBufSize);
7,691,584✔
170
  if (!buf) {
7,691,123✔
171
    code = terrno;
×
172
    goto end;
×
173
  }
174

175
  SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)buf;
7,691,123✔
176
  pRetrieve->version = 0;
7,691,123✔
177
  pRetrieve->precision = precision;
7,691,123✔
178
  pRetrieve->compressed = 0;
7,691,123✔
179
  *((int32_t*)(pRetrieve->data)) = blockSize;
7,691,123✔
180
  *((int32_t*)(pRetrieve->data + INT_BYTES)) = blockSize;
7,691,123✔
181
  if (pBlock == NULL || pBlock->info.rows == 0) {
7,691,123✔
182
    pRetrieve->numOfRows = 0;
3,213,170✔
183
    pRetrieve->numOfBlocks = 0;
3,213,402✔
184
    pRetrieve->completed = 1;
3,213,402✔
185
  } else {
186
    pRetrieve->numOfRows = htobe64((int64_t)pBlock->info.rows);
4,477,953✔
187
    pRetrieve->numOfBlocks = htonl(1);
4,477,953✔
188

189
    uint32_t numOfCols = (uint32_t)taosArrayGetSize(pBlock->pDataBlock);
4,477,953✔
190
    pRetrieve->numOfCols = htonl(numOfCols);
4,478,182✔
191

192
    int32_t actualLen = blockEncodeInternal(pBlock, pRetrieve->data + INT_BYTES * 2, blockSize, numOfCols);
4,478,182✔
193
    if (actualLen < 0) {
4,478,182✔
194
      code = terrno;
×
195
      goto end;
×
196
    }
197
  }
198
  if (finished) {
7,691,584✔
199
    pRetrieve->completed = 1;
3,155,415✔
200
  }
201

202
  *data = buf;
7,691,584✔
203
  *size = dataEncodeBufSize;
7,691,584✔
204
  buf = NULL;
7,691,584✔
205

206
end:
7,691,584✔
207
  rpcFreeCont(buf);
7,691,584✔
208
  return code;
7,691,584✔
209
}
210

211
static int32_t handleStreamFetchData(SSnode* pSnode, void *pWorkerCb, SRpcMsg* pRpcMsg) {
2,763,508✔
212
  int32_t code = 0, lino = 0;
2,763,508✔
213
  void* taskAddr = NULL;
2,763,508✔
214
  SResFetchReq req = {0};
2,763,508✔
215
  SSTriggerCalcRequest calcReq = {0};
2,763,267✔
216
  SStreamRunnerTask* pTask = NULL;
2,763,267✔
217
  void* buf = NULL;
2,763,267✔
218
  size_t size = 0;
2,763,267✔
219

220
  stDebug("handleStreamFetchData, msgType:%s, contLen:%d 0x%" PRIx64 ":0x%" PRIx64, 
2,763,267✔
221
      TMSG_INFO(pRpcMsg->msgType), pRpcMsg->contLen, TRACE_GET_ROOTID(&pRpcMsg->info.traceId), TRACE_GET_MSGID(&pRpcMsg->info.traceId));
222
  
223
  TAOS_CHECK_EXIT(tDeserializeSResFetchReq(pRpcMsg->pCont,pRpcMsg->contLen, &req));
2,763,508✔
224

225
  calcReq.streamId = req.queryId;
2,763,508✔
226
  calcReq.runnerTaskId = req.taskId;
2,763,508✔
227
  calcReq.brandNew = req.reset;
2,763,508✔
228
  calcReq.execId = req.execId;
2,763,508✔
229
  if (req.pStRtFuncInfo) {
2,763,508✔
230
    calcReq.sessionId = req.pStRtFuncInfo->sessionId;
2,763,267✔
231
    calcReq.triggerType = req.pStRtFuncInfo->triggerType;
2,763,508✔
232
    calcReq.isWindowTrigger = req.pStRtFuncInfo->isWindowTrigger;
2,763,026✔
233
    calcReq.precision = req.pStRtFuncInfo->precision;
2,763,508✔
234
    calcReq.isMultiGroupCalc = req.pStRtFuncInfo->isMultiGroupCalc;
2,763,026✔
235
    calcReq.stbPartByTbname = req.pStRtFuncInfo->stbPartByTbname;
2,763,267✔
236
    if (calcReq.isMultiGroupCalc) {
2,763,026✔
NEW
237
      TSWAP(calcReq.pGroupCalcInfos, req.pStRtFuncInfo->pGroupCalcInfos);
×
NEW
238
      TSWAP(calcReq.pGroupReadInfos, req.pStRtFuncInfo->pGroupReadInfos);
×
239
    } else {
240
      TSWAP(calcReq.groupColVals, req.pStRtFuncInfo->pStreamPartColVals);
2,763,026✔
241
      TSWAP(calcReq.params, req.pStRtFuncInfo->pStreamPesudoFuncVals);
2,763,508✔
242
      calcReq.gid = req.pStRtFuncInfo->groupId;
2,763,508✔
243
    }
244
    calcReq.curWinIdx = req.pStRtFuncInfo->curIdx;
2,763,267✔
245
  }
246
  calcReq.pOutBlock = NULL;
2,763,508✔
247

248
  TAOS_CHECK_EXIT(streamAcquireTask(calcReq.streamId, calcReq.runnerTaskId, (SStreamTask**)&pTask, &taskAddr));
2,763,508✔
249

250
  pTask->msgCb = pSnode->msgCb;
2,763,508✔
251
  //pTask->pMsgCb = &pSnode->msgCb;
252
  pTask->pWorkerCb = pWorkerCb;
2,763,267✔
253
  
254
  TAOS_CHECK_EXIT(stRunnerTaskExecute(pTask, &calcReq));
2,762,785✔
255

256
  TAOS_CHECK_EXIT(buildStreamFetchRsp(calcReq.pOutBlock, &buf, &size, 0, false));
2,763,508✔
257

258
_exit:
2,763,508✔
259

260
  tDestroySTriggerCalcRequest(&calcReq);
2,763,508✔
261
  tDestroySResFetchReq(&req);
2,763,508✔
262
  SRpcMsg rsp = {.code = code, .msgType = TDMT_STREAM_FETCH_FROM_RUNNER_RSP, .contLen = size, .pCont = buf, .info = pRpcMsg->info};
2,763,508✔
263
  tmsgSendRsp(&rsp);
2,763,508✔
264
  
265
  streamReleaseTask(taskAddr);
2,763,508✔
266

267
  if (code) {
2,763,508✔
UNCOV
268
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
×
269
  }
270
  
271
  return code;
2,763,508✔
272
}
273

274
static int32_t handleStreamFetchFromCache(SSnode* pSnode, SRpcMsg* pRpcMsg) {
4,928,076✔
275
  int32_t code = 0, lino = 0;
4,928,076✔
276
  SResFetchReq req = {0};
4,928,076✔
277
  SStreamCacheReadInfo readInfo = {0};
4,928,076✔
278
  void* buf = NULL;
4,928,076✔
279
  int64_t streamId = 0;
4,928,076✔
280
  size_t size = 0;
4,928,076✔
281
  TAOS_CHECK_EXIT(tDeserializeSResFetchReq(pRpcMsg->pCont, pRpcMsg->contLen, &req));
4,928,076✔
282

283
  streamId = req.queryId;
4,928,076✔
284
  readInfo.taskInfo.streamId = req.queryId;
4,928,076✔
285
  readInfo.taskInfo.taskId = req.taskId;
4,928,076✔
286
  readInfo.taskInfo.sessionId = req.pStRtFuncInfo->sessionId;
4,928,076✔
287
  readInfo.gid = req.pStRtFuncInfo->groupId;
4,927,878✔
288
  //SSTriggerCalcParam* pParam = taosArrayGet(req.pStRtFuncInfo->pStreamPesudoFuncVals, req.pStRtFuncInfo->curIdx);
289
  readInfo.start = req.pStRtFuncInfo->curWindow.skey;
4,928,076✔
290
  readInfo.end = req.pStRtFuncInfo->curWindow.ekey;
4,928,076✔
291
  bool finished;
4,926,756✔
292
  TAOS_CHECK_EXIT(stRunnerFetchDataFromCache(&readInfo,&finished));
4,928,076✔
293

294
  TAOS_CHECK_EXIT(buildStreamFetchRsp(readInfo.pBlock, &buf, &size, 0, finished));
4,928,076✔
295

296
_exit:
4,928,076✔
297

298
  printDataBlock(readInfo.pBlock, __func__, "fetchFromCache", streamId);
4,928,076✔
299

300
  stsDebug("task %" PRIx64 " TDMT_STREAM_FETCH_FROM_CACHE_RSP with code:%d rows:%" PRId64 ", size:%d, time range:[%" PRId64 ", %" PRId64 "]", 
4,928,076✔
301
      req.taskId, code, readInfo.pBlock ? readInfo.pBlock->info.rows : 0, (int32_t)size, readInfo.start, readInfo.end);  
302
      
303
  SRpcMsg rsp = {.code = code, .msgType = TDMT_STREAM_FETCH_FROM_CACHE_RSP, .contLen = size, .pCont = buf, .info = pRpcMsg->info};
4,928,076✔
304
  tmsgSendRsp(&rsp);
4,927,847✔
305

306
  if (code) {
4,928,076✔
UNCOV
307
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
×
308
  }
309

310
  blockDataDestroy(readInfo.pBlock);
4,928,076✔
311
  tDestroySResFetchReq(&req);
4,928,076✔
312
  
313
  return code;
4,927,847✔
314
}
315

UNCOV
316
static void sndSendErrorRrsp(SRpcMsg *pMsg, int32_t errCode) {
×
UNCOV
317
  SRpcMsg             rspMsg = {0};
×
318

UNCOV
319
  rspMsg.info = pMsg->info;
×
UNCOV
320
  rspMsg.pCont = NULL;
×
UNCOV
321
  rspMsg.contLen = 0;
×
UNCOV
322
  rspMsg.code = errCode;
×
323
  rspMsg.msgType = pMsg->msgType;
×
324

UNCOV
325
  tmsgSendRsp(&rspMsg);
×
326
}
×
327

328
static int32_t handleStreamDropTableReq(SSnode* pSnode, SRpcMsg* pRpcMsg) {
×
329
  SSTriggerDropRequest req = {0};
×
330
  SStreamRunnerTask* pTask = NULL;
×
UNCOV
331
  void* taskAddr = NULL;
×
332
  int32_t code = 0, lino = 0;
×
333
  TAOS_CHECK_EXIT(tDeserializeSTriggerDropTableRequest(POINTER_SHIFT(pRpcMsg->pCont, sizeof(SMsgHead)), pRpcMsg->contLen - sizeof(SMsgHead), &req));
×
UNCOV
334
  TAOS_CHECK_EXIT(streamAcquireTask(req.streamId, req.runnerTaskId, (SStreamTask**)&pTask, &taskAddr));
×
335
  
336
  pTask->msgCb = pSnode->msgCb;
×
337
  TAOS_CHECK_EXIT(stRunnerTaskDropTable(pTask, &req));
×
338

339
_exit:
×
340
  tDestroySSTriggerDropRequest(&req);
×
341
  if (code) {
×
UNCOV
342
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
×
343
    sndSendErrorRrsp(pRpcMsg, code);
×
344
  } else {
UNCOV
345
    SRpcMsg rsp = {.code = 0, .msgType = TDMT_STREAM_TRIGGER_DROP_RSP, .contLen = 0, .pCont = NULL, .info = pRpcMsg->info};
×
346
    tmsgSendRsp(&rsp);
×
347
  }
348
  streamReleaseTask(taskAddr);
×
349

350
  return code;
×
351
}
352

353

354
int32_t sndProcessStreamMsg(SSnode *pSnode, void *pWorkerCb, SRpcMsg *pMsg) {
11,196,611✔
355
  int32_t code = 0, lino = 0;
11,196,611✔
356
  switch (pMsg->msgType) {
11,196,611✔
357
    case TDMT_STREAM_TRIGGER_CALC:
3,489,344✔
358
      TAOS_CHECK_EXIT(handleTriggerCalcReq(pSnode, pWorkerCb, pMsg));
3,489,344✔
359
      break;
927,340✔
360
    case TDMT_STREAM_DELETE_CHECKPOINT:
3,101✔
361
      TAOS_CHECK_EXIT(handleSyncDeleteCheckPointReq(pSnode, pMsg));
3,101✔
362
      break;
3,101✔
363
    case TDMT_STREAM_SYNC_CHECKPOINT:
6,478✔
364
      TAOS_CHECK_EXIT(handleSyncWriteCheckPointReq(pSnode, pMsg));
6,478✔
365
      break;
6,478✔
366
    case TDMT_STREAM_SYNC_CHECKPOINT_RSP:
6,501✔
367
      TAOS_CHECK_EXIT(handleSyncWriteCheckPointRsp(pSnode, pMsg));
6,501✔
368
      break;
4,090✔
369
    case TDMT_STREAM_FETCH_FROM_RUNNER:
2,763,508✔
370
      TAOS_CHECK_EXIT(handleStreamFetchData(pSnode, pWorkerCb, pMsg));
2,763,508✔
371
      break;
2,763,508✔
372
    case TDMT_STREAM_FETCH_FROM_CACHE:
4,928,076✔
373
      TAOS_CHECK_EXIT(handleStreamFetchFromCache(pSnode, pMsg));
4,928,076✔
374
      break;
4,927,847✔
UNCOV
375
      case TDMT_STREAM_TRIGGER_DROP:
×
UNCOV
376
     TAOS_CHECK_EXIT(handleStreamDropTableReq(pSnode, pMsg));
×
UNCOV
377
      break;
×
UNCOV
378
    default:
×
UNCOV
379
      sndError("invalid snode msg:%d", pMsg->msgType);
×
UNCOV
380
      TAOS_CHECK_EXIT(TSDB_CODE_INVALID_MSG);
×
381
  }
382

383
_exit:
×
384

385
  if (code) {
11,196,779✔
386
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
2,564,871✔
387
  }
388
  
389
  return code;
11,197,008✔
390
}
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