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

taosdata / TDengine / #5071

17 May 2026 01:15AM UTC coverage: 63.054% (-10.3%) from 73.326%
#5071

push

travis-ci

web-flow
feat (TDgpt): Dynamic Model Synchronization Enhancements (#35344)

* refactor: do some internal refactor.

* fix: fix multiprocess sync issue.

* feat: add dynamic anomaly detection and forecasting services

* fix: log error message for undeploying model in exception handling

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: handle undeploy when model exists only on disk

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/286aafa0-c3ce-4c27-b803-2707571e9dc1

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: guard dynamic registry concurrent access

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/5e4db858-6458-40f4-ac28-d1b1b7f97c18

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: tighten service list locking scope

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/5e4db858-6458-40f4-ac28-d1b1b7f97c18

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: restore prophet support and update tests per review feedback

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/92298ae1-7da6-4d07-b20e-101c7cd0b26b

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: improve test name and move copy inside lock scope

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/92298ae1-7da6-4d07-b20e-101c7cd0b26b

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* Potential fix for pull request finding

Co-au... (continued)

238317 of 377957 relevant lines covered (63.05%)

130539817.12 hits per line

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

50.0
/source/dnode/mgmt/node_util/src/dmUtil.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
#define _DEFAULT_SOURCE
17
#include "dmUtil.h"
18

19
const char *dmStatStr(EDndRunStatus stype) {
80,714✔
20
  switch (stype) {
80,714✔
21
    case DND_STAT_INIT:
19,755✔
22
      return "init";
19,755✔
23
    case DND_STAT_RUNNING:
40,357✔
24
      return "running";
40,357✔
25
    case DND_STAT_STOPPED:
20,602✔
26
      return "stopped";
20,602✔
27
    default:
×
28
      return "UNKNOWN";
×
29
  }
30
}
31

32
const char *dmNodeName(EDndNodeType ntype) {
3,754,954✔
33
  switch (ntype) {
3,754,954✔
34
    case VNODE:
536,422✔
35
      return "vnode";
536,422✔
36
    case QNODE:
536,422✔
37
      return "qnode";
536,422✔
38
    case SNODE:
536,422✔
39
      return "snode";
536,422✔
40
    case BNODE:
536,422✔
41
      return "bnode";
536,422✔
42
    case MNODE:
536,422✔
43
      return "mnode";
536,422✔
44
    case XNODE:
536,422✔
45
      return "xnode";
536,422✔
46
    default:
536,422✔
47
      return "dnode";
536,422✔
48
  }
49
}
50

51
void *dmSetMgmtHandle(SArray *pArray, tmsg_t msgType, void *nodeMsgFp, bool needCheckVgId) {
208,131,736✔
52
  SMgmtHandle handle = {
208,131,736✔
53
      .msgType = msgType,
54
      .msgFp = (NodeMsgFp)nodeMsgFp,
208,131,736✔
55
      .needCheckVgId = needCheckVgId,
56
  };
57

58
  return taosArrayPush(pArray, &handle);
208,131,736✔
59
}
60

61
void dmGetMonitorSystemInfo(SMonSysInfo *pInfo) {
×
62
  int32_t code = 0;
×
63
  code = taosGetCpuUsage(&pInfo->cpu_system, &pInfo->cpu_engine);
×
64
  if (code != 0) {
×
65
    dError("failed to get cpu usage since %s", tstrerror(code));
×
66
  }
67
  code = taosGetCpuCores(&pInfo->cpu_cores, false);
×
68
  if (code != 0) {
×
69
    dError("failed to get cpu cores since %s", tstrerror(code));
×
70
  }
71
  code = taosGetProcMemory(&pInfo->mem_engine);
×
72
  if (code != 0) {
×
73
    dError("failed to get proc memory since %s", tstrerror(code));
×
74
  }
75
  code = taosGetSysMemory(&pInfo->mem_system, &pInfo->mem_free, &pInfo->mem_cacheBuffer);
×
76
  if (code != 0) {
×
77
    dError("failed to get sys memory since %s", tstrerror(code));
×
78
  }
79
  pInfo->mem_total = tsTotalMemoryKB;
×
80
  pInfo->disk_engine = 0;
×
81
  pInfo->disk_used = tsDataSpace.size.used;
×
82
  pInfo->disk_total = tsDataSpace.size.total;
×
83
  code = taosGetCardInfoDelta(&pInfo->net_in, &pInfo->net_out);
×
84
  if (code != 0) {
×
85
    dError("failed to get card info since %s", tstrerror(code));
×
86
    taosSetDefaultCardInfoDelta(&pInfo->net_in, &pInfo->net_out);
×
87
  }
88
  code = taosGetProcIODelta(&pInfo->io_read, &pInfo->io_write, &pInfo->io_read_disk, &pInfo->io_write_disk);
×
89
  if (code != 0) {
×
90
    dError("failed to get proc io delta since %s", tstrerror(code));
×
91
    taosSetDefaultProcIODelta(&pInfo->io_read, &pInfo->io_write, &pInfo->io_read_disk, &pInfo->io_write_disk);
×
92
  }
93
  return;
×
94
}
95

96
int32_t dmGetDnodeId(SDnodeData *pData) { return pData->dnodeId; }
61,479,748✔
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