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

taosdata / TDengine / #3646

12 Mar 2025 12:34PM UTC coverage: 28.375% (-27.8%) from 56.156%
#3646

push

travis-ci

web-flow
Merge pull request #30119 from taosdata/ciup30

ci: Update workflow to fix param issue of run_tdgpt_test

59085 of 286935 branches covered (20.59%)

Branch coverage included in aggregate %.

102775 of 283490 relevant lines covered (36.25%)

55149.72 hits per line

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

52.0
/source/dnode/vnode/src/tsdb/tsdbCommit.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 "tsdb.h"
17

18
int32_t tRowInfoCmprFn(const void *p1, const void *p2) {
4✔
19
  SRowInfo *pInfo1 = (SRowInfo *)p1;
4✔
20
  SRowInfo *pInfo2 = (SRowInfo *)p2;
4✔
21

22
  if (pInfo1->suid < pInfo2->suid) {
4✔
23
    return -1;
2✔
24
  } else if (pInfo1->suid > pInfo2->suid) {
2!
25
    return 1;
2✔
26
  }
27

28
  if (pInfo1->uid < pInfo2->uid) {
×
29
    return -1;
×
30
  } else if (pInfo1->uid > pInfo2->uid) {
×
31
    return 1;
×
32
  }
33

34
  return tsdbRowCompare(&pInfo1->row, &pInfo2->row);
×
35
}
36

37
int32_t tsdbBegin(STsdb *pTsdb) {
295✔
38
  int32_t code = 0;
295✔
39
  int32_t lino = 0;
295✔
40

41
  if (!pTsdb) return code;
295!
42

43
  SMemTable *pMemTable;
44
  TAOS_CHECK_GOTO(tsdbMemTableCreate(pTsdb, &pMemTable), &lino, _exit);
295!
45

46
  // lock
47
  if ((code = taosThreadMutexLock(&pTsdb->mutex))) {
295!
48
    TAOS_CHECK_GOTO(TAOS_SYSTEM_ERROR(code), &lino, _exit);
×
49
  }
50

51
  pTsdb->mem = pMemTable;
296✔
52

53
  // unlock
54
  if ((code = taosThreadMutexUnlock(&pTsdb->mutex))) {
296!
55
    TAOS_CHECK_GOTO(TAOS_SYSTEM_ERROR(code), &lino, _exit);
×
56
  }
57

58
_exit:
296✔
59
  if (code) {
296!
60
    tsdbError("vgId:%d, %s failed at %s:%d since %s", TD_VID(pTsdb->pVnode), __func__, __FILE__, lino, tstrerror(code));
×
61
  }
62
  return code;
295✔
63
}
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