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

taosdata / TDengine / #5047

07 May 2026 07:27AM UTC coverage: 73.152% (+0.008%) from 73.144%
#5047

push

travis-ci

web-flow
feat(parser): add support for QUARTER duration alias and related tests (#35268)

6 of 6 new or added lines in 2 files covered. (100.0%)

597 existing lines in 127 files now uncovered.

277691 of 379607 relevant lines covered (73.15%)

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

35
  pSnode->msgCb = pOption->msgCb;
79,184✔
36

37
  return pSnode;
79,184✔
38
}
39

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

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

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

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

66
_exit:
3,245,117✔
67

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

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

80
  if (code) {
3,244,641✔
81
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
1,912,879✔
82
  }
83
  
84
  return code;
3,244,879✔
85
}
86

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

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

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

140
  return 0;
6,205✔
141
}
142

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

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

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

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

175
  SRetrieveTableRsp* pRetrieve = (SRetrieveTableRsp*)buf;
8,058,767✔
176
  pRetrieve->version = 0;
8,058,767✔
177
  pRetrieve->precision = precision;
8,058,767✔
178
  pRetrieve->compressed = 0;
8,058,767✔
179
  *((int32_t*)(pRetrieve->data)) = blockSize;
8,058,767✔
180
  *((int32_t*)(pRetrieve->data + INT_BYTES)) = blockSize;
8,058,767✔
181
  if (pBlock == NULL || pBlock->info.rows == 0) {
8,059,570✔
182
    pRetrieve->numOfRows = 0;
3,632,979✔
183
    pRetrieve->numOfBlocks = 0;
3,632,979✔
184
    pRetrieve->completed = 1;
3,632,979✔
185
  } else {
186
    pRetrieve->numOfRows = htobe64((int64_t)pBlock->info.rows);
4,426,591✔
187
    pRetrieve->numOfBlocks = htonl(1);
4,426,591✔
188

189
    uint32_t numOfCols = (uint32_t)taosArrayGetSize(pBlock->pDataBlock);
4,426,591✔
190
    pRetrieve->numOfCols = htonl(numOfCols);
4,426,591✔
191

192
    int32_t actualLen = blockEncodeInternal(pBlock, pRetrieve->data + INT_BYTES * 2, blockSize, numOfCols);
4,426,591✔
193
    if (actualLen < 0) {
4,426,341✔
194
      code = terrno;
×
195
      goto end;
×
196
    }
197
  }
198
  if (finished) {
8,059,320✔
199
    pRetrieve->completed = 1;
3,640,048✔
200
  }
201

202
  *data = buf;
8,059,320✔
203
  *size = dataEncodeBufSize;
8,059,320✔
204
  buf = NULL;
8,059,320✔
205

206
end:
8,059,320✔
207
  rpcFreeCont(buf);
8,059,320✔
208
  return code;
8,059,570✔
209
}
210

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

220
  stDebug("handleStreamFetchData, msgType:%s, contLen:%d 0x%" PRIx64 ":0x%" PRIx64, 
2,550,221✔
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,550,485✔
224

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

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

250
  pTask->msgCb = pSnode->msgCb;
2,550,485✔
251
  //pTask->pMsgCb = &pSnode->msgCb;
252
  pTask->pWorkerCb = pWorkerCb;
2,550,485✔
253
  
254
  TAOS_CHECK_EXIT(stRunnerTaskExecute(pTask, &calcReq));
2,550,250✔
255

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

258
_exit:
2,550,485✔
259

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

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

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

283
  streamId = req.queryId;
5,509,085✔
284
  readInfo.taskInfo.streamId = req.queryId;
5,509,085✔
285
  readInfo.taskInfo.taskId = req.taskId;
5,509,085✔
286
  readInfo.taskInfo.sessionId = req.pStRtFuncInfo->sessionId;
5,509,085✔
287
  readInfo.gid = req.pStRtFuncInfo->groupId;
5,509,085✔
288
  //SSTriggerCalcParam* pParam = taosArrayGet(req.pStRtFuncInfo->pStreamPesudoFuncVals, req.pStRtFuncInfo->curIdx);
289
  readInfo.start = req.pStRtFuncInfo->curWindow.skey;
5,509,085✔
290
  readInfo.end = req.pStRtFuncInfo->curWindow.ekey;
5,509,085✔
291
  bool finished;
5,507,725✔
292
  TAOS_CHECK_EXIT(stRunnerFetchDataFromCache(&readInfo,&finished));
5,509,085✔
293

294
  TAOS_CHECK_EXIT(buildStreamFetchRsp(readInfo.pBlock, &buf, &size, 0, finished));
5,509,085✔
295

296
_exit:
5,509,085✔
297

298
  printDataBlock(readInfo.pBlock, __func__, "fetchFromCache", streamId);
5,509,085✔
299

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

306
  if (code) {
5,509,085✔
307
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
×
308
  }
309

310
  blockDataDestroy(readInfo.pBlock);
5,509,085✔
311
  tDestroySResFetchReq(&req);
5,508,370✔
312
  
313
  return code;
5,508,881✔
314
}
315

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

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

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

328
static int32_t handleStreamDropTableReq(SSnode* pSnode, SRpcMsg* pRpcMsg) {
×
329
  SSTriggerDropRequest req = {0};
×
330
  SStreamRunnerTask* pTask = NULL;
×
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));
×
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) {
×
342
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
×
343
    sndSendErrorRrsp(pRpcMsg, code);
×
344
  } else {
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,319,927✔
355
  int32_t code = 0, lino = 0;
11,319,927✔
356
  switch (pMsg->msgType) {
11,319,927✔
357
    case TDMT_STREAM_TRIGGER_CALC:
3,245,117✔
358
      TAOS_CHECK_EXIT(handleTriggerCalcReq(pSnode, pWorkerCb, pMsg));
3,245,117✔
359
      break;
1,332,000✔
360
    case TDMT_STREAM_DELETE_CHECKPOINT:
2,821✔
361
      TAOS_CHECK_EXIT(handleSyncDeleteCheckPointReq(pSnode, pMsg));
2,821✔
362
      break;
2,821✔
363
    case TDMT_STREAM_SYNC_CHECKPOINT:
6,205✔
364
      TAOS_CHECK_EXIT(handleSyncWriteCheckPointReq(pSnode, pMsg));
6,205✔
365
      break;
6,205✔
366
    case TDMT_STREAM_SYNC_CHECKPOINT_RSP:
6,214✔
367
      TAOS_CHECK_EXIT(handleSyncWriteCheckPointRsp(pSnode, pMsg));
6,214✔
368
      break;
4,797✔
369
    case TDMT_STREAM_FETCH_FROM_RUNNER:
2,550,485✔
370
      TAOS_CHECK_EXIT(handleStreamFetchData(pSnode, pWorkerCb, pMsg));
2,550,485✔
371
      break;
2,550,485✔
372
    case TDMT_STREAM_FETCH_FROM_CACHE:
5,509,085✔
373
      TAOS_CHECK_EXIT(handleStreamFetchFromCache(pSnode, pMsg));
5,509,085✔
374
      break;
5,508,620✔
375
      case TDMT_STREAM_TRIGGER_DROP:
×
376
     TAOS_CHECK_EXIT(handleStreamDropTableReq(pSnode, pMsg));
×
377
      break;
×
378
    default:
×
379
      sndError("invalid snode msg:%d", pMsg->msgType);
×
380
      TAOS_CHECK_EXIT(TSDB_CODE_INVALID_MSG);
×
381
  }
382

383
_exit:
×
384

385
  if (code) {
11,319,462✔
386
    sndError("%s failed at line %d, error:%s", __FUNCTION__, lino, tstrerror(code));
1,914,534✔
387
  }
388
  
389
  return code;
11,319,462✔
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