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

taosdata / TDengine / #5013

03 Apr 2026 03:59PM UTC coverage: 72.317% (+0.01%) from 72.305%
#5013

push

travis-ci

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

4053 of 5985 new or added lines in 68 files covered. (67.72%)

13131 existing lines in 160 files now uncovered.

257489 of 356056 relevant lines covered (72.32%)

129893134.08 hits per line

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

77.87
/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) {
66,904✔
29
  int32_t code = 0;
66,904✔
30
  SSnode *pSnode = taosMemoryCalloc(1, sizeof(SSnode));
66,904✔
31
  if (pSnode == NULL) {
66,904✔
32
    return NULL;
×
33
  }
34

35
  pSnode->msgCb = pOption->msgCb;
66,904✔
36

37
  return pSnode;
66,904✔
38
}
39

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

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

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

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

66
_exit:
2,599,186✔
67

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

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

80
  if (code) {
2,875,704✔
81
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
1,964,662✔
82
  }
83
  
84
  return code;
2,875,704✔
85
}
86

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

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

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

140
  return 0;
5,296✔
141
}
142

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

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

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

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

175
  SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)buf;
5,989,165✔
176
  pRetrieve->version = 0;
5,989,165✔
177
  pRetrieve->precision = precision;
5,989,165✔
178
  pRetrieve->compressed = 0;
5,989,165✔
179
  *((int32_t*)(pRetrieve->data)) = blockSize;
5,989,165✔
180
  *((int32_t*)(pRetrieve->data + INT_BYTES)) = blockSize;
5,989,165✔
181
  if (pBlock == NULL || pBlock->info.rows == 0) {
5,989,165✔
182
    pRetrieve->numOfRows = 0;
3,092,851✔
183
    pRetrieve->numOfBlocks = 0;
3,092,617✔
184
    pRetrieve->completed = 1;
3,092,617✔
185
  } else {
186
    pRetrieve->numOfRows = htobe64((int64_t)pBlock->info.rows);
2,896,314✔
187
    pRetrieve->numOfBlocks = htonl(1);
2,896,548✔
188

189
    uint32_t numOfCols = (uint32_t)taosArrayGetSize(pBlock->pDataBlock);
2,896,548✔
190
    pRetrieve->numOfCols = htonl(numOfCols);
2,896,548✔
191

192
    int32_t actualLen = blockEncodeInternal(pBlock, pRetrieve->data + INT_BYTES * 2, blockSize, numOfCols);
2,896,548✔
193
    if (actualLen < 0) {
2,896,548✔
194
      code = terrno;
×
195
      goto end;
×
196
    }
197
  }
198
  if (finished) {
5,989,165✔
199
    pRetrieve->completed = 1;
3,158,197✔
200
  }
201

202
  *data = buf;
5,989,165✔
203
  *size = dataEncodeBufSize;
5,989,165✔
204
  buf = NULL;
5,989,100✔
205

206
end:
5,989,100✔
207
  rpcFreeCont(buf);
5,989,100✔
208
  return code;
5,988,931✔
209
}
210

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

220
  stDebug("handleStreamFetchData, msgType:%s, contLen:%d 0x%" PRIx64 ":0x%" PRIx64, 
1,061,992✔
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));
1,061,992✔
224

225
  calcReq.streamId = req.queryId;
1,062,057✔
226
  calcReq.runnerTaskId = req.taskId;
1,062,057✔
227
  calcReq.brandNew = req.reset;
1,062,057✔
228
  calcReq.execId = req.execId;
1,062,057✔
229
  if (req.pStRtFuncInfo) {
1,062,057✔
230
    calcReq.sessionId = req.pStRtFuncInfo->sessionId;
1,062,057✔
231
    calcReq.triggerType = req.pStRtFuncInfo->triggerType;
1,062,057✔
232
    calcReq.isWindowTrigger = req.pStRtFuncInfo->isWindowTrigger;
1,061,992✔
233
    calcReq.precision = req.pStRtFuncInfo->precision;
1,061,992✔
234
    calcReq.isMultiGroupCalc = req.pStRtFuncInfo->isMultiGroupCalc;
1,062,057✔
235
    calcReq.stbPartByTbname = req.pStRtFuncInfo->stbPartByTbname;
1,062,057✔
236
    if (calcReq.isMultiGroupCalc) {
1,061,992✔
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);
1,061,992✔
241
      TSWAP(calcReq.params, req.pStRtFuncInfo->pStreamPesudoFuncVals);
1,062,057✔
242
      calcReq.gid = req.pStRtFuncInfo->groupId;
1,062,057✔
243
    }
244
    calcReq.curWinIdx = req.pStRtFuncInfo->curIdx;
1,061,992✔
245
  }
246
  calcReq.pOutBlock = NULL;
1,062,057✔
247

248
  TAOS_CHECK_EXIT(streamAcquireTask(calcReq.streamId, calcReq.runnerTaskId, (SStreamTask**)&pTask, &taskAddr));
1,062,057✔
249

250
  pTask->msgCb = pSnode->msgCb;
1,061,927✔
251
  //pTask->pMsgCb = &pSnode->msgCb;
252
  pTask->pWorkerCb = pWorkerCb;
1,061,927✔
253
  
254
  TAOS_CHECK_EXIT(stRunnerTaskExecute(pTask, &calcReq));
1,061,862✔
255

256
  TAOS_CHECK_EXIT(buildStreamFetchRsp(calcReq.pOutBlock, &buf, &size, 0, false));
1,062,057✔
257

258
_exit:
1,062,057✔
259

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

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

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

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

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

296
_exit:
4,926,874✔
297

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

300
  stsDebug("task %" PRIx64 " TDMT_STREAM_FETCH_FROM_CACHE_RSP with code:%d rows:%" PRId64 ", size:%d, time range:[%" PRId64 ", %" PRId64 "]", 
4,926,874✔
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,926,874✔
304
  tmsgSendRsp(&rsp);
4,926,874✔
305

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

310
  blockDataDestroy(readInfo.pBlock);
4,927,108✔
311
  tDestroySResFetchReq(&req);
4,927,108✔
312
  
313
  return code;
4,927,108✔
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) {
8,878,306✔
355
  int32_t code = 0, lino = 0;
8,878,306✔
356
  switch (pMsg->msgType) {
8,878,306✔
357
    case TDMT_STREAM_TRIGGER_CALC:
2,875,704✔
358
      TAOS_CHECK_EXIT(handleTriggerCalcReq(pSnode, pWorkerCb, pMsg));
2,875,704✔
359
      break;
911,488✔
360
    case TDMT_STREAM_DELETE_CHECKPOINT:
3,074✔
361
      TAOS_CHECK_EXIT(handleSyncDeleteCheckPointReq(pSnode, pMsg));
3,074✔
362
      break;
3,074✔
363
    case TDMT_STREAM_SYNC_CHECKPOINT:
5,296✔
364
      TAOS_CHECK_EXIT(handleSyncWriteCheckPointReq(pSnode, pMsg));
5,296✔
365
      break;
5,296✔
366
    case TDMT_STREAM_SYNC_CHECKPOINT_RSP:
5,288✔
367
      TAOS_CHECK_EXIT(handleSyncWriteCheckPointRsp(pSnode, pMsg));
5,288✔
368
      break;
3,984✔
369
    case TDMT_STREAM_FETCH_FROM_RUNNER:
1,062,057✔
370
      TAOS_CHECK_EXIT(handleStreamFetchData(pSnode, pWorkerCb, pMsg));
1,062,057✔
371
      break;
1,062,057✔
372
    case TDMT_STREAM_FETCH_FROM_CACHE:
4,927,108✔
373
      TAOS_CHECK_EXIT(handleStreamFetchFromCache(pSnode, pMsg));
4,927,108✔
374
      break;
4,927,108✔
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) {
8,878,505✔
386
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
1,965,966✔
387
  }
388
  
389
  return code;
8,878,527✔
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