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

taosdata / TDengine / #4881

14 Dec 2025 03:48AM UTC coverage: 60.617% (+0.5%) from 60.092%
#4881

push

travis-ci

web-flow
test: update coverage workflow time (#33918)

156854 of 258761 relevant lines covered (60.62%)

75258957.81 hits per line

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

86.14
/source/dnode/mnode/impl/src/mndDef.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
#define _DEFAULT_SOURCE
16
#include "mndConsumer.h"
17
#include "mndDef.h"
18
#include "mndStream.h"
19
#include "taoserror.h"
20
#include "tunit.h"
21

22
int32_t tEncodeSStreamObj(SEncoder *pEncoder, const SStreamObj *pObj) {
20,520✔
23
  TAOS_CHECK_RETURN(tStartEncode(pEncoder));
20,520✔
24

25
  TAOS_CHECK_RETURN(tEncodeCStr(pEncoder, pObj->name));
41,040✔
26
  TAOS_CHECK_RETURN(tSerializeSCMCreateStreamReqImpl(pEncoder, pObj->pCreate));
20,520✔
27

28
  TAOS_CHECK_RETURN(tEncodeI32(pEncoder, pObj->mainSnodeId));
41,040✔
29
  TAOS_CHECK_RETURN(tEncodeI8(pEncoder, pObj->userStopped));
41,040✔
30
  TAOS_CHECK_RETURN(tEncodeI64(pEncoder, pObj->createTime));
41,040✔
31
  TAOS_CHECK_RETURN(tEncodeI64(pEncoder, pObj->updateTime));
41,040✔
32

33
  tEndEncode(pEncoder);
20,520✔
34
  return pEncoder->pos;
20,520✔
35
}
36

37
int32_t tDecodeSStreamObj(SDecoder *pDecoder, SStreamObj *pObj, int32_t sver) {
6,654✔
38
  int32_t code = 0;
6,654✔
39
  int32_t lino = 0;
6,654✔
40
  TAOS_CHECK_RETURN(tStartDecode(pDecoder));
6,654✔
41

42
  TAOS_CHECK_RETURN(tDecodeCStrTo(pDecoder, pObj->name));
6,654✔
43
  pObj->pCreate = taosMemoryCalloc(1, sizeof(*pObj->pCreate));
6,654✔
44
  if (NULL == pObj) {
6,654✔
45
    TAOS_CHECK_EXIT(terrno);
×
46
  }
47
  
48
  if (MND_STREAM_VER_NUMBER == sver) {
6,654✔
49
    TAOS_CHECK_RETURN(tDeserializeSCMCreateStreamReqImpl(pDecoder, pObj->pCreate));
6,654✔
50
  } else {
51
    TAOS_CHECK_RETURN(
×
52
      tDeserializeSCMCreateStreamReqImplOld(pDecoder, pObj->pCreate, 21));
53
  }
54

55
  TAOS_CHECK_RETURN(tDecodeI32(pDecoder, &pObj->mainSnodeId));
13,308✔
56
  TAOS_CHECK_RETURN(tDecodeI8(pDecoder, &pObj->userStopped));
13,308✔
57
  TAOS_CHECK_RETURN(tDecodeI64(pDecoder, &pObj->createTime));
13,308✔
58
  TAOS_CHECK_RETURN(tDecodeI64(pDecoder, &pObj->updateTime));
13,308✔
59

60
_exit:
6,654✔
61

62
  tEndDecode(pDecoder);
6,654✔
63
  tDecoderClear(pDecoder);  
6,654✔
64
  
65
  TAOS_RETURN(code);
6,654✔
66
}
67

68
void tFreeStreamObj(SStreamObj *pStream) {
11,784✔
69
  tFreeSCMCreateStreamReq(pStream->pCreate);
11,784✔
70
  taosMemoryFreeClear(pStream->pCreate);
11,784✔
71
}
11,784✔
72

73
void freeSMqConsumerEp(void* data) {
33,612✔
74
  if (data == NULL) return;
33,612✔
75
  SMqConsumerEp *pConsumerEp = (SMqConsumerEp *)data;
33,612✔
76
  taosArrayDestroy(pConsumerEp->vgs);
33,612✔
77
  pConsumerEp->vgs = NULL;
33,612✔
78
  taosArrayDestroy(pConsumerEp->offsetRows);
33,612✔
79
  pConsumerEp->offsetRows = NULL;
33,612✔
80
}
81

82
int32_t tEncodeSMqVgEp(void **buf, const SMqVgEp *pVgEp) {
294,120✔
83
  int32_t tlen = 0;
294,120✔
84
  tlen += taosEncodeFixedI32(buf, pVgEp->vgId);
294,120✔
85
  tlen += taosEncodeSEpSet(buf, &pVgEp->epSet);
294,120✔
86
  return tlen;
294,120✔
87
}
88

89
void *tDecodeSMqVgEp(const void *buf, SMqVgEp *pVgEp, int8_t sver) {
141,037✔
90
  buf = taosDecodeFixedI32(buf, &pVgEp->vgId);
141,037✔
91
  if (sver == 1) {
141,037✔
92
    uint64_t size = 0;
×
93
    buf = taosDecodeVariantU64(buf, &size);
×
94
    buf = POINTER_SHIFT(buf, size);
×
95
  }
96
  buf = taosDecodeSEpSet(buf, &pVgEp->epSet);
141,037✔
97
  return (void *)buf;
141,037✔
98
}
99

100
static void *topicNameDup(void *p) { return taosStrdup((char *)p); }
11,204✔
101

102
int32_t tNewSMqConsumerObj(int64_t consumerId, char *cgroup, int8_t updateType, char *topic, SCMSubscribeReq *subscribe,
54,476✔
103
                           SMqConsumerObj **ppConsumer) {
104
  int32_t         code = 0;
54,476✔
105
  SMqConsumerObj *pConsumer = taosMemoryCalloc(1, sizeof(SMqConsumerObj));
54,476✔
106
  if (pConsumer == NULL) {
54,476✔
107
    code = terrno;
×
108
    goto END;
×
109
  }
110

111
  pConsumer->consumerId = consumerId;
54,476✔
112
  (void)memcpy(pConsumer->cgroup, cgroup, TSDB_CGROUP_LEN);
54,476✔
113

114
  pConsumer->epoch = 0;
54,476✔
115
  pConsumer->status = MQ_CONSUMER_STATUS_REBALANCE;
54,476✔
116
  pConsumer->hbStatus = 0;
54,476✔
117
  pConsumer->pollStatus = 0;
54,476✔
118

119
  taosInitRWLatch(&pConsumer->lock);
54,476✔
120
  pConsumer->createTime = taosGetTimestampMs();
54,476✔
121
  pConsumer->updateType = updateType;
54,476✔
122

123
  if (updateType == CONSUMER_ADD_REB) {
54,476✔
124
    pConsumer->rebNewTopics = taosArrayInit(0, sizeof(void *));
11,204✔
125
    if (pConsumer->rebNewTopics == NULL) {
11,204✔
126
      code = terrno;
×
127
      goto END;
×
128
    }
129

130
    char *topicTmp = taosStrdup(topic);
11,204✔
131
    if (taosArrayPush(pConsumer->rebNewTopics, &topicTmp) == NULL) {
22,408✔
132
      code = terrno;
×
133
      goto END;
×
134
    }
135
  } else if (updateType == CONSUMER_REMOVE_REB) {
43,272✔
136
    pConsumer->rebRemovedTopics = taosArrayInit(0, sizeof(void *));
10,979✔
137
    if (pConsumer->rebRemovedTopics == NULL) {
10,979✔
138
      code = terrno;
×
139
      goto END;
×
140
    }
141
    char *topicTmp = taosStrdup(topic);
10,979✔
142
    if (taosArrayPush(pConsumer->rebRemovedTopics, &topicTmp) == NULL) {
21,958✔
143
      code = terrno;
×
144
      goto END;
×
145
    }
146
  } else if (updateType == CONSUMER_INSERT_SUB) {
32,293✔
147
    tstrncpy(pConsumer->clientId, subscribe->clientId, tListLen(pConsumer->clientId));
11,204✔
148
    pConsumer->withTbName = subscribe->withTbName;
11,204✔
149
    pConsumer->autoCommit = subscribe->autoCommit;
11,204✔
150
    pConsumer->autoCommitInterval = subscribe->autoCommitInterval;
11,204✔
151
    pConsumer->resetOffsetCfg = subscribe->resetOffsetCfg;
11,204✔
152
    pConsumer->maxPollIntervalMs = subscribe->maxPollIntervalMs;
11,204✔
153
    pConsumer->sessionTimeoutMs = subscribe->sessionTimeoutMs;
11,204✔
154
    tstrncpy(pConsumer->user, subscribe->user, TSDB_USER_LEN);
11,204✔
155
    tstrncpy(pConsumer->fqdn, subscribe->fqdn, TSDB_FQDN_LEN);
11,204✔
156

157
    pConsumer->rebNewTopics = taosArrayDup(subscribe->topicNames, topicNameDup);
11,204✔
158
    if (pConsumer->rebNewTopics == NULL) {
11,204✔
159
      code = terrno;
×
160
      goto END;
×
161
    }
162
    pConsumer->assignedTopics = subscribe->topicNames;
11,204✔
163
    subscribe->topicNames = NULL;
11,204✔
164
  } else if (updateType == CONSUMER_UPDATE_SUB) {
21,089✔
165
    pConsumer->assignedTopics = subscribe->topicNames;
10,531✔
166
    subscribe->topicNames = NULL;
10,531✔
167
  }
168

169
  *ppConsumer = pConsumer;
54,476✔
170
  return 0;
54,476✔
171

172
END:
×
173
  tDeleteSMqConsumerObj(pConsumer);
×
174
  return code;
×
175
}
176

177
void tClearSMqConsumerObj(SMqConsumerObj *pConsumer) {
191,234✔
178
  if (pConsumer == NULL) return;
191,234✔
179
  taosArrayDestroyP(pConsumer->currentTopics, NULL);
108,952✔
180
  taosArrayDestroyP(pConsumer->rebNewTopics, NULL);
108,952✔
181
  taosArrayDestroyP(pConsumer->rebRemovedTopics, NULL);
108,952✔
182
  taosArrayDestroyP(pConsumer->assignedTopics, NULL);
108,952✔
183
}
184

185
void tDeleteSMqConsumerObj(SMqConsumerObj *pConsumer) {
136,758✔
186
  tClearSMqConsumerObj(pConsumer);
136,758✔
187
  taosMemoryFree(pConsumer);
136,758✔
188
}
136,758✔
189

190
int32_t tEncodeSMqConsumerObj(void **buf, const SMqConsumerObj *pConsumer) {
110,244✔
191
  int32_t tlen = 0;
110,244✔
192
  int32_t sz;
193
  tlen += taosEncodeFixedI64(buf, pConsumer->consumerId);
110,244✔
194
  tlen += taosEncodeString(buf, pConsumer->clientId);
110,244✔
195
  tlen += taosEncodeString(buf, pConsumer->cgroup);
110,244✔
196
  tlen += taosEncodeFixedI8(buf, pConsumer->updateType);
110,244✔
197
  tlen += taosEncodeFixedI32(buf, pConsumer->epoch);
110,244✔
198
  tlen += taosEncodeFixedI32(buf, pConsumer->status);
110,244✔
199

200
  tlen += taosEncodeFixedI32(buf, pConsumer->pid);
110,244✔
201
  tlen += taosEncodeSEpSet(buf, &pConsumer->ep);
110,244✔
202
  tlen += taosEncodeFixedI64(buf, pConsumer->createTime);
110,244✔
203
  tlen += taosEncodeFixedI64(buf, pConsumer->subscribeTime);
110,244✔
204
  tlen += taosEncodeFixedI64(buf, pConsumer->rebalanceTime);
110,244✔
205

206
  // current topics
207
  if (pConsumer->currentTopics) {
110,244✔
208
    sz = taosArrayGetSize(pConsumer->currentTopics);
1,292✔
209
    tlen += taosEncodeFixedI32(buf, sz);
1,292✔
210
    for (int32_t i = 0; i < sz; i++) {
1,292✔
211
      char *topic = taosArrayGetP(pConsumer->currentTopics, i);
×
212
      tlen += taosEncodeString(buf, topic);
×
213
    }
214
  } else {
215
    tlen += taosEncodeFixedI32(buf, 0);
108,952✔
216
  }
217

218
  // reb new topics
219
  if (pConsumer->rebNewTopics) {
110,244✔
220
    sz = taosArrayGetSize(pConsumer->rebNewTopics);
67,170✔
221
    tlen += taosEncodeFixedI32(buf, sz);
67,170✔
222
    for (int32_t i = 0; i < sz; i++) {
111,986✔
223
      char *topic = taosArrayGetP(pConsumer->rebNewTopics, i);
44,816✔
224
      tlen += taosEncodeString(buf, topic);
44,816✔
225
    }
226
  } else {
227
    tlen += taosEncodeFixedI32(buf, 0);
43,074✔
228
  }
229

230
  // reb removed topics
231
  if (pConsumer->rebRemovedTopics) {
110,244✔
232
    sz = taosArrayGetSize(pConsumer->rebRemovedTopics);
44,312✔
233
    tlen += taosEncodeFixedI32(buf, sz);
44,312✔
234
    for (int32_t i = 0; i < sz; i++) {
87,332✔
235
      char *topic = taosArrayGetP(pConsumer->rebRemovedTopics, i);
43,020✔
236
      tlen += taosEncodeString(buf, topic);
43,020✔
237
    }
238
  } else {
239
    tlen += taosEncodeFixedI32(buf, 0);
65,932✔
240
  }
241

242
  // lost topics
243
  if (pConsumer->assignedTopics) {
110,244✔
244
    sz = taosArrayGetSize(pConsumer->assignedTopics);
44,762✔
245
    tlen += taosEncodeFixedI32(buf, sz);
44,762✔
246
    for (int32_t i = 0; i < sz; i++) {
67,170✔
247
      char *topic = taosArrayGetP(pConsumer->assignedTopics, i);
22,408✔
248
      tlen += taosEncodeString(buf, topic);
22,408✔
249
    }
250
  } else {
251
    tlen += taosEncodeFixedI32(buf, 0);
65,482✔
252
  }
253

254
  tlen += taosEncodeFixedI8(buf, pConsumer->withTbName);
110,244✔
255
  tlen += taosEncodeFixedI8(buf, pConsumer->autoCommit);
110,244✔
256
  tlen += taosEncodeFixedI32(buf, pConsumer->autoCommitInterval);
110,244✔
257
  tlen += taosEncodeFixedI32(buf, pConsumer->resetOffsetCfg);
110,244✔
258
  tlen += taosEncodeFixedI32(buf, pConsumer->maxPollIntervalMs);
110,244✔
259
  tlen += taosEncodeFixedI32(buf, pConsumer->sessionTimeoutMs);
110,244✔
260
  tlen += taosEncodeString(buf, pConsumer->user);
110,244✔
261
  tlen += taosEncodeString(buf, pConsumer->fqdn);
110,244✔
262
  return tlen;
110,244✔
263
}
264

265
void *tDecodeSMqConsumerObj(const void *buf, SMqConsumerObj *pConsumer, int8_t sver) {
54,476✔
266
  int32_t sz;
54,476✔
267
  buf = taosDecodeFixedI64(buf, &pConsumer->consumerId);
54,476✔
268
  buf = taosDecodeStringTo(buf, pConsumer->clientId);
54,476✔
269
  buf = taosDecodeStringTo(buf, pConsumer->cgroup);
54,476✔
270
  buf = taosDecodeFixedI8(buf, &pConsumer->updateType);
54,476✔
271
  buf = taosDecodeFixedI32(buf, &pConsumer->epoch);
54,476✔
272
  buf = taosDecodeFixedI32(buf, &pConsumer->status);
54,476✔
273

274
  buf = taosDecodeFixedI32(buf, &pConsumer->pid);
54,476✔
275
  buf = taosDecodeSEpSet(buf, &pConsumer->ep);
54,476✔
276
  buf = taosDecodeFixedI64(buf, &pConsumer->createTime);
54,476✔
277
  buf = taosDecodeFixedI64(buf, &pConsumer->subscribeTime);
54,476✔
278
  buf = taosDecodeFixedI64(buf, &pConsumer->rebalanceTime);
108,952✔
279

280
  // current topics
281
  buf = taosDecodeFixedI32(buf, &sz);
54,476✔
282
  pConsumer->currentTopics = taosArrayInit(sz, sizeof(void *));
54,476✔
283
  if (pConsumer->currentTopics == NULL) {
54,476✔
284
    return NULL;
×
285
  }
286
  for (int32_t i = 0; i < sz; i++) {
54,476✔
287
    char *topic;
×
288
    buf = taosDecodeString(buf, &topic);
×
289
    if (taosArrayPush(pConsumer->currentTopics, &topic) == NULL) {
×
290
      return NULL;
×
291
    }
292
  }
293

294
  // reb new topics
295
  buf = taosDecodeFixedI32(buf, &sz);
54,476✔
296
  pConsumer->rebNewTopics = taosArrayInit(sz, sizeof(void *));
54,476✔
297
  for (int32_t i = 0; i < sz; i++) {
76,884✔
298
    char *topic;
22,408✔
299
    buf = taosDecodeString(buf, &topic);
22,408✔
300
    if (taosArrayPush(pConsumer->rebNewTopics, &topic) == NULL) {
44,816✔
301
      return NULL;
×
302
    }
303
  }
304

305
  // reb removed topics
306
  buf = taosDecodeFixedI32(buf, &sz);
54,476✔
307
  pConsumer->rebRemovedTopics = taosArrayInit(sz, sizeof(void *));
54,476✔
308
  for (int32_t i = 0; i < sz; i++) {
75,986✔
309
    char *topic;
21,510✔
310
    buf = taosDecodeString(buf, &topic);
21,510✔
311
    if (taosArrayPush(pConsumer->rebRemovedTopics, &topic) == NULL) {
43,020✔
312
      return NULL;
×
313
    }
314
  }
315

316
  // reb removed topics
317
  buf = taosDecodeFixedI32(buf, &sz);
54,476✔
318
  pConsumer->assignedTopics = taosArrayInit(sz, sizeof(void *));
54,476✔
319
  for (int32_t i = 0; i < sz; i++) {
65,680✔
320
    char *topic;
11,204✔
321
    buf = taosDecodeString(buf, &topic);
11,204✔
322
    if (taosArrayPush(pConsumer->assignedTopics, &topic) == NULL) {
22,408✔
323
      return NULL;
×
324
    }
325
  }
326

327
  if (sver > 1) {
54,476✔
328
    buf = taosDecodeFixedI8(buf, &pConsumer->withTbName);
54,476✔
329
    buf = taosDecodeFixedI8(buf, &pConsumer->autoCommit);
54,476✔
330
    buf = taosDecodeFixedI32(buf, &pConsumer->autoCommitInterval);
54,476✔
331
    buf = taosDecodeFixedI32(buf, &pConsumer->resetOffsetCfg);
108,952✔
332
  }
333
  if (sver > 2) {
54,476✔
334
    buf = taosDecodeFixedI32(buf, &pConsumer->maxPollIntervalMs);
54,476✔
335
    buf = taosDecodeFixedI32(buf, &pConsumer->sessionTimeoutMs);
54,476✔
336
    buf = taosDecodeStringTo(buf, pConsumer->user);
54,476✔
337
    buf = taosDecodeStringTo(buf, pConsumer->fqdn);
108,952✔
338
  } else {
339
    pConsumer->maxPollIntervalMs = DEFAULT_MAX_POLL_INTERVAL;
×
340
    pConsumer->sessionTimeoutMs = DEFAULT_SESSION_TIMEOUT;
×
341
  }
342

343
  return (void *)buf;
54,476✔
344
}
345

346
int32_t tEncodeOffRows(void **buf, SArray *offsetRows) {
77,906✔
347
  int32_t tlen = 0;
77,906✔
348
  int32_t szVgs = taosArrayGetSize(offsetRows);
77,906✔
349
  tlen += taosEncodeFixedI32(buf, szVgs);
77,906✔
350
  for (int32_t j = 0; j < szVgs; ++j) {
320,290✔
351
    OffsetRows *offRows = taosArrayGet(offsetRows, j);
242,384✔
352
    tlen += taosEncodeFixedI32(buf, offRows->vgId);
242,384✔
353
    tlen += taosEncodeFixedI64(buf, offRows->rows);
242,384✔
354
    tlen += taosEncodeFixedI8(buf, offRows->offset.type);
242,384✔
355
    if (offRows->offset.type == TMQ_OFFSET__SNAPSHOT_DATA || offRows->offset.type == TMQ_OFFSET__SNAPSHOT_META) {
242,384✔
356
      tlen += taosEncodeFixedI64(buf, offRows->offset.uid);
×
357
      tlen += taosEncodeFixedI64(buf, offRows->offset.ts);
×
358
    } else if (offRows->offset.type == TMQ_OFFSET__LOG) {
242,384✔
359
      tlen += taosEncodeFixedI64(buf, offRows->offset.version);
432,728✔
360
    } else {
361
      // do nothing
362
    }
363
    tlen += taosEncodeFixedI64(buf, offRows->ever);
484,768✔
364
  }
365

366
  return tlen;
77,906✔
367
}
368

369
int32_t tEncodeSMqConsumerEp(void **buf, const SMqConsumerEp *pConsumerEp) {
22,858✔
370
  int32_t tlen = 0;
22,858✔
371
  tlen += taosEncodeFixedI64(buf, pConsumerEp->consumerId);
22,858✔
372
  int32_t sz = taosArrayGetSize(pConsumerEp->vgs);
22,858✔
373
  tlen += taosEncodeFixedI32(buf, sz);
22,858✔
374
  for (int32_t i = 0; i < sz; i++) {
144,950✔
375
    void* data = taosArrayGet(pConsumerEp->vgs, i);
122,092✔
376
    tlen += tEncodeSMqVgEp(buf, data);
122,092✔
377
  }
378

379
  return tlen + tEncodeOffRows(buf, pConsumerEp->offsetRows);
22,858✔
380
}
381

382
void *tDecodeOffRows(const void *buf, SArray **offsetRows, int8_t sver) {
37,330✔
383
  int32_t szVgs = 0;
37,330✔
384
  buf = taosDecodeFixedI32(buf, &szVgs);
37,330✔
385
  if (szVgs > 0) {
37,330✔
386
    *offsetRows = taosArrayInit(szVgs, sizeof(OffsetRows));
20,335✔
387
    if (NULL == *offsetRows) return NULL;
20,335✔
388
    for (int32_t j = 0; j < szVgs; ++j) {
135,504✔
389
      OffsetRows *offRows = taosArrayReserve(*offsetRows, 1);
115,169✔
390
      buf = taosDecodeFixedI32(buf, &offRows->vgId);
115,169✔
391
      buf = taosDecodeFixedI64(buf, &offRows->rows);
115,169✔
392
      buf = taosDecodeFixedI8(buf, &offRows->offset.type);
115,169✔
393
      if (offRows->offset.type == TMQ_OFFSET__SNAPSHOT_DATA || offRows->offset.type == TMQ_OFFSET__SNAPSHOT_META) {
115,169✔
394
        buf = taosDecodeFixedI64(buf, &offRows->offset.uid);
×
395
        buf = taosDecodeFixedI64(buf, &offRows->offset.ts);
×
396
      } else if (offRows->offset.type == TMQ_OFFSET__LOG) {
115,169✔
397
        buf = taosDecodeFixedI64(buf, &offRows->offset.version);
206,240✔
398
      } else {
399
        // do nothing
400
      }
401
      if (sver > 2) {
115,169✔
402
        buf = taosDecodeFixedI64(buf, &offRows->ever);
230,338✔
403
      }
404
    }
405
  }
406
  return (void *)buf;
37,330✔
407
}
408

409
void *tDecodeSMqConsumerEp(const void *buf, SMqConsumerEp *pConsumerEp, int8_t sver) {
11,429✔
410
  buf = taosDecodeFixedI64(buf, &pConsumerEp->consumerId);
11,429✔
411
  int32_t sz = 0;
11,429✔
412
  buf = taosDecodeFixedI32(buf, &sz);
11,429✔
413
  pConsumerEp->vgs = taosArrayInit(sz, sizeof(SMqVgEp));
11,429✔
414
  if (pConsumerEp->vgs == NULL) {
11,429✔
415
    return NULL;
×
416
  }
417
  for (int32_t i = 0; i < sz; i++) {
72,475✔
418
    SMqVgEp* vgEp = taosArrayReserve(pConsumerEp->vgs, 1);
61,046✔
419
    if (vgEp != NULL)
61,046✔
420
      buf = tDecodeSMqVgEp(buf, vgEp, sver);
61,046✔
421
  }
422
  if (sver > 1) {
11,429✔
423
    buf = tDecodeOffRows(buf, &pConsumerEp->offsetRows, sver);
11,429✔
424
  }
425

426
  return (void *)buf;
11,429✔
427
}
428

429
int32_t tNewSubscribeObj(const char *key, SMqSubscribeObj **ppSub) {
5,341✔
430
  int32_t          code = 0;
5,341✔
431
  SMqSubscribeObj *pSubObj = taosMemoryCalloc(1, sizeof(SMqSubscribeObj));
5,341✔
432
  MND_TMQ_NULL_CHECK(pSubObj);
5,341✔
433
  *ppSub = pSubObj;
5,341✔
434
  
435
  (void)memcpy(pSubObj->key, key, TSDB_SUBSCRIBE_KEY_LEN);
5,341✔
436
  taosInitRWLatch(&pSubObj->lock);
5,341✔
437
  pSubObj->vgNum = 0;
5,341✔
438
  pSubObj->consumerHash = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_ENTRY_LOCK);
5,341✔
439
  MND_TMQ_NULL_CHECK(pSubObj->consumerHash);
5,341✔
440
  taosHashSetFreeFp(pSubObj->consumerHash, freeSMqConsumerEp);
5,341✔
441

442
  pSubObj->unassignedVgs = taosArrayInit(0, sizeof(SMqVgEp));
5,341✔
443
  MND_TMQ_NULL_CHECK(pSubObj->unassignedVgs);
5,341✔
444

445
END:
5,341✔
446
  return code;
5,341✔
447
}
448

449
int32_t tCloneSubscribeObj(const SMqSubscribeObj *pSub, SMqSubscribeObj **ppSub) {
16,842✔
450
  int32_t          code = 0;
16,842✔
451
  SMqSubscribeObj *pSubNew = taosMemoryMalloc(sizeof(SMqSubscribeObj));
16,842✔
452
  if (pSubNew == NULL) {
16,842✔
453
    code = terrno;
×
454
    goto END;
×
455
  }
456
  *ppSub = pSubNew;
16,842✔
457

458
  (void)memcpy(pSubNew->key, pSub->key, TSDB_SUBSCRIBE_KEY_LEN);
16,842✔
459
  taosInitRWLatch(&pSubNew->lock);
16,842✔
460

461
  pSubNew->dbUid = pSub->dbUid;
16,842✔
462
  pSubNew->stbUid = pSub->stbUid;
16,842✔
463
  pSubNew->subType = pSub->subType;
16,842✔
464
  pSubNew->withMeta = pSub->withMeta;
16,842✔
465

466
  pSubNew->vgNum = pSub->vgNum;
16,842✔
467
  pSubNew->consumerHash = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), false, HASH_ENTRY_LOCK);
16,842✔
468
  if (pSubNew->consumerHash == NULL) {
16,842✔
469
    code = terrno;
×
470
    goto END;
×
471
  }
472
  taosHashSetFreeFp(pSubNew->consumerHash, freeSMqConsumerEp);
16,842✔
473

474
  void          *pIter = NULL;
16,842✔
475
  SMqConsumerEp *pConsumerEp = NULL;
16,842✔
476
  while (1) {
10,979✔
477
    pIter = taosHashIterate(pSub->consumerHash, pIter);
27,821✔
478
    if (pIter == NULL) break;
27,821✔
479
    pConsumerEp = (SMqConsumerEp *)pIter;
10,979✔
480
    SMqConsumerEp newEp = {
10,979✔
481
        .consumerId = pConsumerEp->consumerId,
10,979✔
482
        .vgs = taosArrayDup(pConsumerEp->vgs, NULL),
10,979✔
483
    };
484
    if ((code = taosHashPut(pSubNew->consumerHash, &newEp.consumerId, sizeof(int64_t), &newEp,
10,979✔
485
                            sizeof(SMqConsumerEp))) != 0)
486
      goto END;
×
487
  }
488
  pSubNew->unassignedVgs = taosArrayDup(pSub->unassignedVgs, NULL);
16,842✔
489
  if (pSubNew->unassignedVgs == NULL) {
16,842✔
490
    code = terrno;
×
491
    goto END;
×
492
  }
493
  pSubNew->offsetRows = taosArrayDup(pSub->offsetRows, NULL);
16,842✔
494
  if (pSub->offsetRows != NULL && pSubNew->offsetRows == NULL) {
16,842✔
495
    code = terrno;
×
496
    goto END;
×
497
  }
498
  (void)memcpy(pSubNew->dbName, pSub->dbName, TSDB_DB_FNAME_LEN);
16,842✔
499
  pSubNew->qmsg = taosStrdup(pSub->qmsg);
16,842✔
500
  if (pSubNew->qmsg == NULL) {
16,842✔
501
    code = terrno;
×
502
    goto END;
×
503
  }
504

505
END:
16,842✔
506
  return code;
16,842✔
507
}
508

509
void tDeleteSubscribeObj(SMqSubscribeObj *pSub) {
48,084✔
510
  if (pSub == NULL) return;
48,084✔
511
  taosHashCleanup(pSub->consumerHash);
48,084✔
512
  pSub->consumerHash = NULL;
48,084✔
513
  taosArrayDestroy(pSub->unassignedVgs);
48,084✔
514
  pSub->unassignedVgs = NULL;
48,084✔
515
  taosMemoryFreeClear(pSub->qmsg);
48,084✔
516
  taosArrayDestroy(pSub->offsetRows);
48,084✔
517
  pSub->offsetRows = NULL;
48,084✔
518
}
519

520
int32_t tEncodeSubscribeObj(void **buf, const SMqSubscribeObj *pSub) {
55,048✔
521
  int32_t tlen = 0;
55,048✔
522
  tlen += taosEncodeString(buf, pSub->key);
55,048✔
523
  tlen += taosEncodeFixedI64(buf, pSub->dbUid);
55,048✔
524
  tlen += taosEncodeFixedI32(buf, pSub->vgNum);
55,048✔
525
  tlen += taosEncodeFixedI8(buf, pSub->subType);
55,048✔
526
  tlen += taosEncodeFixedI8(buf, pSub->withMeta);
55,048✔
527
  tlen += taosEncodeFixedI64(buf, pSub->stbUid);
55,048✔
528

529
  void   *pIter = NULL;
55,048✔
530
  int32_t sz = taosHashGetSize(pSub->consumerHash);
55,048✔
531
  tlen += taosEncodeFixedI32(buf, sz);
55,048✔
532

533
  int32_t cnt = 0;
55,048✔
534
  while (1) {
22,858✔
535
    pIter = taosHashIterate(pSub->consumerHash, pIter);
77,906✔
536
    if (pIter == NULL) break;
77,906✔
537
    SMqConsumerEp *pConsumerEp = (SMqConsumerEp *)pIter;
22,858✔
538
    tlen += tEncodeSMqConsumerEp(buf, pConsumerEp);
22,858✔
539
    cnt++;
22,858✔
540
  }
541
  if (cnt != sz) return -1;
55,048✔
542
  int32_t len = taosArrayGetSize(pSub->unassignedVgs);
55,048✔
543
  tlen += taosEncodeFixedI32(buf, len);
55,048✔
544
  for (int32_t i = 0; i < len; i++) {
227,076✔
545
    void* data = taosArrayGet(pSub->unassignedVgs, i);
172,028✔
546
    tlen += tEncodeSMqVgEp(buf, data);
172,028✔
547
  }
548
  tlen += taosEncodeString(buf, pSub->dbName);
55,048✔
549

550
  tlen += tEncodeOffRows(buf, pSub->offsetRows);
55,048✔
551
  tlen += taosEncodeString(buf, pSub->qmsg);
55,048✔
552
  return tlen;
55,048✔
553
}
554

555
void *tDecodeSubscribeObj(const void *buf, SMqSubscribeObj *pSub, int8_t sver) {
25,901✔
556
  //
557
  buf = taosDecodeStringTo(buf, pSub->key);
25,901✔
558
  buf = taosDecodeFixedI64(buf, &pSub->dbUid);
25,901✔
559
  buf = taosDecodeFixedI32(buf, &pSub->vgNum);
25,901✔
560
  buf = taosDecodeFixedI8(buf, &pSub->subType);
25,901✔
561
  buf = taosDecodeFixedI8(buf, &pSub->withMeta);
25,901✔
562
  buf = taosDecodeFixedI64(buf, &pSub->stbUid);
25,901✔
563

564
  int32_t sz;
25,901✔
565
  buf = taosDecodeFixedI32(buf, &sz);
25,901✔
566

567
  pSub->consumerHash = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_NO_LOCK);
25,901✔
568
  if (pSub->consumerHash == NULL) {
25,901✔
569
    return NULL;
×
570
  }
571
  taosHashSetFreeFp(pSub->consumerHash, freeSMqConsumerEp);
25,901✔
572

573
  for (int32_t i = 0; i < sz; i++) {
37,330✔
574
    SMqConsumerEp consumerEp = {0};
11,429✔
575
    buf = tDecodeSMqConsumerEp(buf, &consumerEp, sver);
11,429✔
576
    if (taosHashPut(pSub->consumerHash, &consumerEp.consumerId, sizeof(int64_t), &consumerEp, sizeof(SMqConsumerEp)) !=
11,429✔
577
        0)
578
      return NULL;
×
579
  }
580

581
  int32_t len = 0;
25,901✔
582
  buf = taosDecodeFixedI32(buf, &len);
25,901✔
583
  pSub->unassignedVgs = taosArrayInit(len, sizeof(SMqVgEp));
25,901✔
584
  if (pSub->unassignedVgs == NULL) {
25,901✔
585
    return NULL;
×
586
  }
587
  for (int32_t i = 0; i < len; i++) {
105,892✔
588
    SMqVgEp* vgEp = taosArrayReserve(pSub->unassignedVgs, 1);
79,991✔
589
    if (vgEp != NULL)
79,991✔
590
      buf = tDecodeSMqVgEp(buf, vgEp, sver);
79,991✔
591
  }
592

593
  buf = taosDecodeStringTo(buf, pSub->dbName);
25,901✔
594

595
  if (sver > 1) {
25,901✔
596
    buf = tDecodeOffRows(buf, &pSub->offsetRows, sver);
25,901✔
597
    buf = taosDecodeString(buf, &pSub->qmsg);
51,802✔
598
  } else {
599
    pSub->qmsg = taosStrdup("");
×
600
  }
601
  return (void *)buf;
25,901✔
602
}
603

604
int32_t mndInitConfigObj(SConfigItem *pItem, SConfigObj *pObj) {
17,474,630✔
605
  tstrncpy(pObj->name, pItem->name, CFG_NAME_MAX_LEN);
17,474,630✔
606
  pObj->dtype = pItem->dtype;
17,474,630✔
607
  switch (pItem->dtype) {
17,474,630✔
608
    case CFG_DTYPE_NONE:
×
609
      break;
×
610
    case CFG_DTYPE_BOOL:
3,461,955✔
611
      pObj->bval = pItem->bval;
3,461,955✔
612
      break;
3,461,955✔
613
    case CFG_DTYPE_INT32:
9,561,590✔
614
      pObj->i32 = pItem->i32;
9,561,590✔
615
      break;
9,561,590✔
616
    case CFG_DTYPE_INT64:
989,130✔
617
      pObj->i64 = pItem->i64;
989,130✔
618
      break;
989,130✔
619
    case CFG_DTYPE_FLOAT:
329,710✔
620
    case CFG_DTYPE_DOUBLE:
621
      pObj->fval = pItem->fval;
329,710✔
622
      break;
329,710✔
623
    case CFG_DTYPE_STRING:
3,132,245✔
624
    case CFG_DTYPE_DIR:
625
    case CFG_DTYPE_LOCALE:
626
    case CFG_DTYPE_CHARSET:
627
    case CFG_DTYPE_TIMEZONE:
628
      pObj->str = taosStrdup(pItem->str);
3,132,245✔
629
      if (pObj->str == NULL) {
3,132,245✔
630
        taosMemoryFree(pObj);
×
631
        return TSDB_CODE_OUT_OF_MEMORY;
×
632
      }
633
      break;
3,132,245✔
634
  }
635
  return TSDB_CODE_SUCCESS;
17,474,630✔
636
}
637

638
int32_t mndUpdateObj(SConfigObj *pObjNew, const char *name, char *value) {
6,269✔
639
  int32_t code = 0;
6,269✔
640
  switch (pObjNew->dtype) {
6,269✔
641
    case CFG_DTYPE_BOOL: {
1,453✔
642
      bool tmp = false;
1,453✔
643
      if (strcasecmp(value, "true") == 0) {
1,453✔
644
        tmp = true;
×
645
      }
646
      if (taosStr2Int32(value, NULL, 10) > 0) {
1,453✔
647
        tmp = true;
435✔
648
      }
649
      pObjNew->bval = tmp;
1,453✔
650
      break;
1,453✔
651
    }
652
    case CFG_DTYPE_INT32: {
4,178✔
653
      int32_t ival;
4,178✔
654
      TAOS_CHECK_RETURN(taosStrHumanToInt32(value, &ival));
4,178✔
655
      pObjNew->i32 = ival;
4,178✔
656
      break;
4,178✔
657
    }
658
    case CFG_DTYPE_INT64: {
471✔
659
      int64_t ival;
471✔
660
      TAOS_CHECK_RETURN(taosStrHumanToInt64(value, &ival));
471✔
661
      pObjNew->i64 = ival;
471✔
662
      break;
471✔
663
    }
664
    case CFG_DTYPE_FLOAT:
×
665
    case CFG_DTYPE_DOUBLE: {
666
      float dval = 0;
×
667
      TAOS_CHECK_RETURN(parseCfgReal(value, &dval));
×
668
      pObjNew->fval = dval;
×
669
      break;
×
670
    }
671
    case CFG_DTYPE_DIR:
167✔
672
    case CFG_DTYPE_TIMEZONE:
673
    case CFG_DTYPE_CHARSET:
674
    case CFG_DTYPE_LOCALE:
675
    case CFG_DTYPE_STRING: {
676
      pObjNew->str = taosStrdup(value);
167✔
677
      if (pObjNew->str == NULL) {
167✔
678
        code = terrno;
×
679
        return code;
×
680
      }
681
      break;
167✔
682
    }
683
    case CFG_DTYPE_NONE:
×
684
      break;
×
685
    default:
×
686
      code = TSDB_CODE_INVALID_CFG;
×
687
      break;
×
688
  }
689
  return code;
6,269✔
690
}
691

692
SConfigObj mndInitConfigVersion() {
164,855✔
693
  SConfigObj obj;
164,801✔
694
  memset(&obj, 0, sizeof(SConfigObj));
164,855✔
695

696
  tstrncpy(obj.name, "tsmmConfigVersion", CFG_NAME_MAX_LEN);
164,855✔
697
  obj.dtype = CFG_DTYPE_INT32;
164,855✔
698
  obj.i32 = 0;
164,855✔
699
  return obj;
164,855✔
700
}
701

702
int32_t tEncodeSConfigObj(SEncoder *pEncoder, const SConfigObj *pObj) {
130,784,996✔
703
  TAOS_CHECK_RETURN(tStartEncode(pEncoder));
130,784,996✔
704
  TAOS_CHECK_RETURN(tEncodeCStr(pEncoder, pObj->name));
261,569,992✔
705

706
  TAOS_CHECK_RETURN(tEncodeI32(pEncoder, pObj->dtype));
261,569,992✔
707
  switch (pObj->dtype) {
130,784,996✔
708
    case CFG_DTYPE_BOOL:
25,664,652✔
709
      TAOS_CHECK_RETURN(tEncodeI8(pEncoder, pObj->bval));
51,329,304✔
710
      break;
25,664,652✔
711
    case CFG_DTYPE_INT32:
72,128,814✔
712
      TAOS_CHECK_RETURN(tEncodeI32(pEncoder, pObj->i32));
144,257,628✔
713
      break;
72,128,814✔
714
    case CFG_DTYPE_INT64:
7,332,768✔
715
      TAOS_CHECK_RETURN(tEncodeI64(pEncoder, pObj->i64));
14,665,536✔
716
      break;
7,332,768✔
717
    case CFG_DTYPE_FLOAT:
2,443,628✔
718
    case CFG_DTYPE_DOUBLE:
719
      TAOS_CHECK_RETURN(tEncodeFloat(pEncoder, pObj->fval));
4,887,256✔
720
      break;
2,443,628✔
721
    case CFG_DTYPE_STRING:
23,215,134✔
722
    case CFG_DTYPE_DIR:
723
    case CFG_DTYPE_LOCALE:
724
    case CFG_DTYPE_CHARSET:
725
    case CFG_DTYPE_TIMEZONE:
726
      if (pObj->str != NULL) {
23,215,134✔
727
        TAOS_CHECK_RETURN(tEncodeCStr(pEncoder, pObj->str));
46,430,268✔
728
      } else {
729
        TAOS_CHECK_RETURN(tEncodeCStr(pEncoder, ""));
×
730
      }
731
      break;
23,215,134✔
732
    default:
×
733
      break;
×
734
  }
735
  tEndEncode(pEncoder);
130,784,996✔
736
  return pEncoder->pos;
130,784,996✔
737
}
738

739
int32_t tDecodeSConfigObj(SDecoder *pDecoder, SConfigObj *pObj) {
24,553,900✔
740
  TAOS_CHECK_RETURN(tStartDecode(pDecoder));
24,553,900✔
741
  TAOS_CHECK_RETURN(tDecodeCStrTo(pDecoder, pObj->name));
24,553,900✔
742
  TAOS_CHECK_RETURN(tDecodeI32(pDecoder, (int32_t *)&pObj->dtype));
49,107,800✔
743
  switch (pObj->dtype) {
24,553,900✔
744
    case CFG_DTYPE_NONE:
×
745
      break;
×
746
    case CFG_DTYPE_BOOL:
4,801,466✔
747
      TAOS_CHECK_RETURN(tDecodeBool(pDecoder, &pObj->bval));
4,801,466✔
748
      break;
4,801,466✔
749
    case CFG_DTYPE_INT32:
13,590,766✔
750
      TAOS_CHECK_RETURN(tDecodeI32(pDecoder, &pObj->i32));
27,181,532✔
751
      break;
13,590,766✔
752
    case CFG_DTYPE_INT64:
1,373,718✔
753
      TAOS_CHECK_RETURN(tDecodeI64(pDecoder, &pObj->i64));
2,747,436✔
754
      break;
1,373,718✔
755
    case CFG_DTYPE_FLOAT:
458,048✔
756
    case CFG_DTYPE_DOUBLE:
757
      TAOS_CHECK_RETURN(tDecodeFloat(pDecoder, &pObj->fval));
916,096✔
758
      break;
458,048✔
759
    case CFG_DTYPE_STRING:
4,329,902✔
760
    case CFG_DTYPE_DIR:
761
    case CFG_DTYPE_LOCALE:
762
    case CFG_DTYPE_CHARSET:
763
    case CFG_DTYPE_TIMEZONE:
764
      TAOS_CHECK_RETURN(tDecodeCStrAlloc(pDecoder, &pObj->str));
8,659,804✔
765
      break;
4,329,902✔
766
  }
767
  tEndDecode(pDecoder);
24,553,900✔
768
  TAOS_RETURN(TSDB_CODE_SUCCESS);
24,553,900✔
769
}
770

771
void tFreeSConfigObj(SConfigObj *obj) {
42,203,248✔
772
  if (obj == NULL) {
42,203,248✔
773
    return;
×
774
  }
775
  if (obj->dtype == CFG_DTYPE_STRING || obj->dtype == CFG_DTYPE_DIR || obj->dtype == CFG_DTYPE_LOCALE ||
42,203,248✔
776
      obj->dtype == CFG_DTYPE_CHARSET || obj->dtype == CFG_DTYPE_TIMEZONE) {
35,526,882✔
777
    taosMemoryFree(obj->str);
7,461,839✔
778
  }
779
}
780

781
// SMqSubActionLogEntry *tCloneSMqSubActionLogEntry(SMqSubActionLogEntry *pEntry) {
782
//   SMqSubActionLogEntry *pEntryNew = taosMemoryMalloc(sizeof(SMqSubActionLogEntry));
783
//   if (pEntryNew == NULL) return NULL;
784
//   pEntryNew->epoch = pEntry->epoch;
785
//   pEntryNew->consumers = taosArrayDup(pEntry->consumers, (__array_item_dup_fn_t)tCloneSMqConsumerEp);
786
//   return pEntryNew;
787
// }
788
//
789
// void tDeleteSMqSubActionLogEntry(SMqSubActionLogEntry *pEntry) {
790
//   taosArrayDestroyEx(pEntry->consumers, (FDelete)tDeleteSMqConsumerEp);
791
// }
792

793
// int32_t tEncodeSMqSubActionLogEntry(void **buf, const SMqSubActionLogEntry *pEntry) {
794
//   int32_t tlen = 0;
795
//   tlen += taosEncodeFixedI32(buf, pEntry->epoch);
796
//   tlen += taosEncodeArray(buf, pEntry->consumers, (FEncode)tEncodeSMqSubActionLogEntry);
797
//   return tlen;
798
// }
799
//
800
// void *tDecodeSMqSubActionLogEntry(const void *buf, SMqSubActionLogEntry *pEntry) {
801
//   buf = taosDecodeFixedI32(buf, &pEntry->epoch);
802
//   buf = taosDecodeArray(buf, &pEntry->consumers, (FDecode)tDecodeSMqSubActionLogEntry, sizeof(SMqSubActionLogEntry));
803
//   return (void *)buf;
804
// }
805

806
// SMqSubActionLogObj *tCloneSMqSubActionLogObj(SMqSubActionLogObj *pLog) {
807
//   SMqSubActionLogObj *pLogNew = taosMemoryMalloc(sizeof(SMqSubActionLogObj));
808
//   if (pLogNew == NULL) return pLogNew;
809
//   memcpy(pLogNew->key, pLog->key, TSDB_SUBSCRIBE_KEY_LEN);
810
//   pLogNew->logs = taosArrayDup(pLog->logs, (__array_item_dup_fn_t)tCloneSMqConsumerEp);
811
//   return pLogNew;
812
// }
813
//
814
// void tDeleteSMqSubActionLogObj(SMqSubActionLogObj *pLog) {
815
//   taosArrayDestroyEx(pLog->logs, (FDelete)tDeleteSMqConsumerEp);
816
// }
817

818
// int32_t tEncodeSMqSubActionLogObj(void **buf, const SMqSubActionLogObj *pLog) {
819
//   int32_t tlen = 0;
820
//   tlen += taosEncodeString(buf, pLog->key);
821
//   tlen += taosEncodeArray(buf, pLog->logs, (FEncode)tEncodeSMqSubActionLogEntry);
822
//   return tlen;
823
// }
824
//
825
// void *tDecodeSMqSubActionLogObj(const void *buf, SMqSubActionLogObj *pLog) {
826
//   buf = taosDecodeStringTo(buf, pLog->key);
827
//   buf = taosDecodeArray(buf, &pLog->logs, (FDecode)tDecodeSMqSubActionLogEntry, sizeof(SMqSubActionLogEntry));
828
//   return (void *)buf;
829
// }
830
//
831
// int32_t tEncodeSMqOffsetObj(void **buf, const SMqOffsetObj *pOffset) {
832
//   int32_t tlen = 0;
833
//   tlen += taosEncodeString(buf, pOffset->key);
834
//   tlen += taosEncodeFixedI64(buf, pOffset->offset);
835
//   return tlen;
836
// }
837
//
838
// void *tDecodeSMqOffsetObj(void *buf, SMqOffsetObj *pOffset) {
839
//   buf = taosDecodeStringTo(buf, pOffset->key);
840
//   buf = taosDecodeFixedI64(buf, &pOffset->offset);
841
//   return buf;
842
// }
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