Merge pull request #24757 from taosdata/coverage/TD-28559-3.0
Coverage: tsdbUtil.c remove no call function
This commit is contained in:
commit
bd0bd62625
|
@ -82,9 +82,11 @@ void mndTransSetSerial(STrans *pTrans);
|
|||
void mndTransSetParallel(STrans *pTrans);
|
||||
void mndTransSetOper(STrans *pTrans, EOperType oper);
|
||||
int32_t mndTransCheckConflict(SMnode *pMnode, STrans *pTrans);
|
||||
#ifndef BUILD_NO_CALL
|
||||
static int32_t mndTrancCheckConflict(SMnode *pMnode, STrans *pTrans) {
|
||||
return mndTransCheckConflict(pMnode, pTrans);
|
||||
}
|
||||
#endif
|
||||
int32_t mndTransPrepare(SMnode *pMnode, STrans *pTrans);
|
||||
int32_t mndTransProcessRsp(SRpcMsg *pRsp);
|
||||
void mndTransPullup(SMnode *pMnode);
|
||||
|
|
|
@ -719,7 +719,7 @@ static int32_t mergeLastCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SC
|
|||
|
||||
static int32_t mergeLastRowCid(tb_uid_t uid, STsdb *pTsdb, SArray **ppLastArray, SCacheRowsReader *pr, int16_t *aCols,
|
||||
int nCols, int16_t *slotIds);
|
||||
#if 1
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t tsdbCacheGetSlow(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheRowsReader *pr, int8_t ltype) {
|
||||
rocksdb_writebatch_t *wb = NULL;
|
||||
int32_t code = 0;
|
||||
|
@ -821,7 +821,6 @@ int32_t tsdbCacheGetSlow(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCacheR
|
|||
|
||||
return code;
|
||||
}
|
||||
#endif
|
||||
|
||||
static SLastCol *tsdbCacheLoadCol(STsdb *pTsdb, SCacheRowsReader *pr, int16_t slotid, tb_uid_t uid, int16_t cid,
|
||||
int8_t ltype) {
|
||||
|
@ -880,6 +879,7 @@ static SLastCol *tsdbCacheLoadCol(STsdb *pTsdb, SCacheRowsReader *pr, int16_t sl
|
|||
|
||||
return pLastCol;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int32_t tsdbCacheLoadFromRaw(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SArray *remainCols,
|
||||
SCacheRowsReader *pr, int8_t ltype) {
|
||||
|
@ -1359,6 +1359,7 @@ static void getTableCacheKey(tb_uid_t uid, int cacheType, char *key, int *len) {
|
|||
*len = sizeof(uint64_t);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
static void deleteTableCacheLast(const void *key, size_t keyLen, void *value, void *ud) {
|
||||
(void)ud;
|
||||
SArray *pLastArray = (SArray *)value;
|
||||
|
@ -1670,6 +1671,7 @@ int32_t tsdbCacheInsertLast(SLRUCache *pCache, tb_uid_t uid, TSDBROW *row, STsdb
|
|||
|
||||
return code;
|
||||
}
|
||||
#endif
|
||||
|
||||
static tb_uid_t getTableSuidByUid(tb_uid_t uid, STsdb *pTsdb) {
|
||||
tb_uid_t suid = 0;
|
||||
|
@ -1715,6 +1717,7 @@ static int32_t getTableDelDataFromTbData(STbData *pTbData, SArray *aDelData) {
|
|||
return code;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
static int32_t getTableDelData(STbData *pMem, STbData *pIMem, SDelFReader *pDelReader, SDelIdx *pDelIdx,
|
||||
SArray *aDelData) {
|
||||
int32_t code = 0;
|
||||
|
@ -1759,6 +1762,7 @@ _err:
|
|||
}
|
||||
return code;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void freeTableInfoFunc(void *param) {
|
||||
void **p = (void **)param;
|
||||
|
@ -2716,6 +2720,7 @@ _err:
|
|||
return code;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
static int32_t initLastColArray(STSchema *pTSchema, SArray **ppColArray) {
|
||||
SArray *pColArray = taosArrayInit(pTSchema->numOfCols, sizeof(SLastCol));
|
||||
if (NULL == pColArray) {
|
||||
|
@ -2729,6 +2734,7 @@ static int32_t initLastColArray(STSchema *pTSchema, SArray **ppColArray) {
|
|||
*ppColArray = pColArray;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int32_t initLastColArrayPartial(STSchema *pTSchema, SArray **ppColArray, int16_t *slotIds, int nCols) {
|
||||
SArray *pColArray = taosArrayInit(nCols, sizeof(SLastCol));
|
||||
|
@ -3089,7 +3095,9 @@ void tsdbCacheSetCapacity(SVnode *pVnode, size_t capacity) {
|
|||
taosLRUCacheSetCapacity(pVnode->pTsdb->lruCache, capacity);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
size_t tsdbCacheGetCapacity(SVnode *pVnode) { return taosLRUCacheGetCapacity(pVnode->pTsdb->lruCache); }
|
||||
#endif
|
||||
|
||||
size_t tsdbCacheGetUsage(SVnode *pVnode) {
|
||||
size_t usage = 0;
|
||||
|
@ -3185,6 +3193,7 @@ int32_t tsdbCacheGetBlockIdx(SLRUCache *pCache, SDataFReader *pFileReader, LRUHa
|
|||
return code;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t tsdbBICacheRelease(SLRUCache *pCache, LRUHandle *h) {
|
||||
int32_t code = 0;
|
||||
|
||||
|
@ -3193,6 +3202,7 @@ int32_t tsdbBICacheRelease(SLRUCache *pCache, LRUHandle *h) {
|
|||
|
||||
return code;
|
||||
}
|
||||
#endif
|
||||
|
||||
// block cache
|
||||
static void getBCacheKey(int32_t fid, int64_t commitID, int64_t blkno, char *key, int *len) {
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "tsdb.h"
|
||||
#include "vnodeInt.h"
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
// STsdbDataIter2
|
||||
/* open */
|
||||
int32_t tsdbOpenDataFileDataIter(SDataFReader* pReader, STsdbDataIter2** ppIter) {
|
||||
|
@ -451,6 +452,7 @@ int32_t tsdbDataIterNext2(STsdbDataIter2* pIter, STsdbFilterInfo* pFilterInfo) {
|
|||
return code;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* get */
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ void tMapDataClear(SMapData *pMapData) {
|
|||
pMapData->aOffset = NULL;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t tMapDataPutItem(SMapData *pMapData, void *pItem, int32_t (*tPutItemFn)(uint8_t *, void *)) {
|
||||
int32_t code = 0;
|
||||
int32_t offset = pMapData->nData;
|
||||
|
@ -95,12 +96,14 @@ int32_t tMapDataSearch(SMapData *pMapData, void *pSearchItem, int32_t (*tGetItem
|
|||
_exit:
|
||||
return code;
|
||||
}
|
||||
#endif
|
||||
|
||||
void tMapDataGetItemByIdx(SMapData *pMapData, int32_t idx, void *pItem, int32_t (*tGetItemFn)(uint8_t *, void *)) {
|
||||
ASSERT(idx >= 0 && idx < pMapData->nItem);
|
||||
tGetItemFn(pMapData->pData + pMapData->aOffset[idx], pItem);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t tMapDataToArray(SMapData *pMapData, int32_t itemSize, int32_t (*tGetItemFn)(uint8_t *, void *),
|
||||
SArray **ppArray) {
|
||||
int32_t code = 0;
|
||||
|
@ -140,6 +143,7 @@ int32_t tPutMapData(uint8_t *p, SMapData *pMapData) {
|
|||
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t tGetMapData(uint8_t *p, SMapData *pMapData) {
|
||||
int32_t n = 0;
|
||||
|
@ -167,6 +171,7 @@ int32_t tGetMapData(uint8_t *p, SMapData *pMapData) {
|
|||
return n;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
// TABLEID =======================================================================
|
||||
int32_t tTABLEIDCmprFn(const void *p1, const void *p2) {
|
||||
TABLEID *pId1 = (TABLEID *)p1;
|
||||
|
@ -199,6 +204,7 @@ int32_t tPutBlockIdx(uint8_t *p, void *ph) {
|
|||
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t tGetBlockIdx(uint8_t *p, void *ph) {
|
||||
int32_t n = 0;
|
||||
|
@ -212,6 +218,7 @@ int32_t tGetBlockIdx(uint8_t *p, void *ph) {
|
|||
return n;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t tCmprBlockIdx(void const *lhs, void const *rhs) {
|
||||
SBlockIdx *lBlockIdx = (SBlockIdx *)lhs;
|
||||
SBlockIdx *rBlockIdx = (SBlockIdx *)rhs;
|
||||
|
@ -280,6 +287,7 @@ int32_t tPutDataBlk(uint8_t *p, void *ph) {
|
|||
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t tGetDataBlk(uint8_t *p, void *ph) {
|
||||
int32_t n = 0;
|
||||
|
@ -310,6 +318,7 @@ int32_t tGetDataBlk(uint8_t *p, void *ph) {
|
|||
return n;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t tDataBlkCmprFn(const void *p1, const void *p2) {
|
||||
SDataBlk *pBlock1 = (SDataBlk *)p1;
|
||||
SDataBlk *pBlock2 = (SDataBlk *)p2;
|
||||
|
@ -349,6 +358,7 @@ int32_t tPutSttBlk(uint8_t *p, void *ph) {
|
|||
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t tGetSttBlk(uint8_t *p, void *ph) {
|
||||
int32_t n = 0;
|
||||
|
@ -438,6 +448,7 @@ int32_t tGetBlockCol(uint8_t *p, void *ph) {
|
|||
return n;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t tBlockColCmprFn(const void *p1, const void *p2) {
|
||||
if (((SBlockCol *)p1)->cid < ((SBlockCol *)p2)->cid) {
|
||||
return -1;
|
||||
|
@ -479,6 +490,7 @@ int32_t tPutDelIdx(uint8_t *p, void *ph) {
|
|||
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t tGetDelIdx(uint8_t *p, void *ph) {
|
||||
SDelIdx *pDelIdx = (SDelIdx *)ph;
|
||||
|
@ -492,6 +504,7 @@ int32_t tGetDelIdx(uint8_t *p, void *ph) {
|
|||
return n;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
// SDelData ======================================================
|
||||
int32_t tPutDelData(uint8_t *p, void *ph) {
|
||||
SDelData *pDelData = (SDelData *)ph;
|
||||
|
@ -503,6 +516,7 @@ int32_t tPutDelData(uint8_t *p, void *ph) {
|
|||
|
||||
return n;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t tGetDelData(uint8_t *p, void *ph) {
|
||||
SDelData *pDelData = (SDelData *)ph;
|
||||
|
@ -1269,6 +1283,7 @@ _exit:
|
|||
return code;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t tBlockDataTryUpsertRow(SBlockData *pBlockData, TSDBROW *pRow, int64_t uid) {
|
||||
if (pBlockData->nRow == 0) {
|
||||
return 1;
|
||||
|
@ -1286,6 +1301,7 @@ int32_t tBlockDataUpsertRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTS
|
|||
return tBlockDataAppendRow(pBlockData, pRow, pTSchema, uid);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void tBlockDataGetColData(SBlockData *pBlockData, int16_t cid, SColData **ppColData) {
|
||||
ASSERT(cid != PRIMARYKEY_TIMESTAMP_COL_ID);
|
||||
|
|
|
@ -42,6 +42,7 @@ void regexDestroy(FstRegex *regex) {
|
|||
taosMemoryFree(regex);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
uint32_t regexAutomStart(FstRegex *regex) {
|
||||
///// no nothing
|
||||
return 0;
|
||||
|
@ -65,3 +66,4 @@ bool regexAutomAccept(FstRegex *regex, uint32_t state, uint8_t byte, uint32_t *r
|
|||
}
|
||||
return dfaAccept(regex->dfa, state, byte, result);
|
||||
}
|
||||
#endif
|
|
@ -684,12 +684,14 @@ int idxTFileSearch(void* tfile, SIndexTermQuery* query, SIdxTRslt* result) {
|
|||
|
||||
return tfileReaderSearch(reader, query, result);
|
||||
}
|
||||
#ifdef BUILD_NO_CALL
|
||||
int idxTFilePut(void* tfile, SIndexTerm* term, uint64_t uid) {
|
||||
// TFileWriterOpt wOpt = {.suid = term->suid, .colType = term->colType, .colName = term->colName, .nColName =
|
||||
// term->nColName, .version = 1};
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
static bool tfileIteratorNext(Iterate* iiter) {
|
||||
IterateValue* iv = &iiter->val;
|
||||
iterateValueDestroy(iv, false);
|
||||
|
|
|
@ -32,4 +32,9 @@ TARGET_INCLUDE_DIRECTORIES(
|
|||
add_test(
|
||||
NAME streamUpdateTest
|
||||
COMMAND streamUpdateTest
|
||||
)
|
||||
)
|
||||
|
||||
# add_test(
|
||||
# NAME checkpointTest
|
||||
# COMMAND checkpointTest
|
||||
# )
|
|
@ -39,7 +39,9 @@ int main(int argc, char **argv) {
|
|||
return -1;
|
||||
}
|
||||
strcpy(tsSnodeAddress, "127.0.0.1");
|
||||
return RUN_ALL_TESTS();
|
||||
int ret = RUN_ALL_TESTS();
|
||||
s3CleanUp();
|
||||
return ret;
|
||||
}
|
||||
|
||||
TEST(testCase, checkpointUpload_Test) {
|
||||
|
|
|
@ -413,6 +413,7 @@ int32_t syncEndSnapshot(int64_t rid) {
|
|||
return code;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t syncStepDown(int64_t rid, SyncTerm newTerm) {
|
||||
SSyncNode* pSyncNode = syncNodeAcquire(rid);
|
||||
if (pSyncNode == NULL) {
|
||||
|
@ -424,6 +425,7 @@ int32_t syncStepDown(int64_t rid, SyncTerm newTerm) {
|
|||
syncNodeRelease(pSyncNode);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool syncNodeIsReadyForRead(SSyncNode* pSyncNode) {
|
||||
if (pSyncNode == NULL) {
|
||||
|
@ -458,6 +460,7 @@ bool syncIsReadyForRead(int64_t rid) {
|
|||
return ready;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
bool syncSnapshotSending(int64_t rid) {
|
||||
SSyncNode* pSyncNode = syncNodeAcquire(rid);
|
||||
if (pSyncNode == NULL) {
|
||||
|
@ -479,6 +482,7 @@ bool syncSnapshotRecving(int64_t rid) {
|
|||
syncNodeRelease(pSyncNode);
|
||||
return b;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t syncNodeLeaderTransfer(SSyncNode* pSyncNode) {
|
||||
if (pSyncNode->peersNum == 0) {
|
||||
|
@ -1060,7 +1064,9 @@ SSyncNode* syncNodeOpen(SSyncInfo* pSyncInfo, int32_t vnodeVersion) {
|
|||
pSyncNode->heartbeatTimerMS = pSyncNode->hbBaseLine;
|
||||
atomic_store_64(&pSyncNode->heartbeatTimerLogicClock, 0);
|
||||
atomic_store_64(&pSyncNode->heartbeatTimerLogicClockUser, 0);
|
||||
#ifdef BUILD_NO_CALL
|
||||
pSyncNode->FpHeartbeatTimerCB = syncNodeEqHeartbeatTimer;
|
||||
#endif
|
||||
pSyncNode->heartbeatTimerCounter = 0;
|
||||
|
||||
// init peer heartbeat timer
|
||||
|
@ -1151,6 +1157,7 @@ _error:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
void syncNodeMaybeUpdateCommitBySnapshot(SSyncNode* pSyncNode) {
|
||||
if (pSyncNode->pFsm != NULL && pSyncNode->pFsm->FpGetSnapshotInfo != NULL) {
|
||||
SSnapshot snapshot = {0};
|
||||
|
@ -1160,6 +1167,7 @@ void syncNodeMaybeUpdateCommitBySnapshot(SSyncNode* pSyncNode) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t syncNodeRestore(SSyncNode* pSyncNode) {
|
||||
ASSERTS(pSyncNode->pLogStore != NULL, "log store not created");
|
||||
|
@ -1214,6 +1222,7 @@ int32_t syncNodeStart(SSyncNode* pSyncNode) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t syncNodeStartStandBy(SSyncNode* pSyncNode) {
|
||||
// state change
|
||||
pSyncNode->state = TAOS_SYNC_STATE_FOLLOWER;
|
||||
|
@ -1235,6 +1244,7 @@ int32_t syncNodeStartStandBy(SSyncNode* pSyncNode) {
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
void syncNodePreClose(SSyncNode* pSyncNode) {
|
||||
ASSERT(pSyncNode != NULL);
|
||||
|
@ -1401,6 +1411,7 @@ void syncNodeResetElectTimer(SSyncNode* pSyncNode) {
|
|||
electMS);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
static int32_t syncNodeDoStartHeartbeatTimer(SSyncNode* pSyncNode) {
|
||||
int32_t ret = 0;
|
||||
if (syncIsInit()) {
|
||||
|
@ -1414,6 +1425,7 @@ static int32_t syncNodeDoStartHeartbeatTimer(SSyncNode* pSyncNode) {
|
|||
sNTrace(pSyncNode, "start heartbeat timer, ms:%d", pSyncNode->heartbeatTimerMS);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t syncNodeStartHeartbeatTimer(SSyncNode* pSyncNode) {
|
||||
int32_t ret = 0;
|
||||
|
@ -1452,11 +1464,13 @@ int32_t syncNodeStopHeartbeatTimer(SSyncNode* pSyncNode) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t syncNodeRestartHeartbeatTimer(SSyncNode* pSyncNode) {
|
||||
syncNodeStopHeartbeatTimer(pSyncNode);
|
||||
syncNodeStartHeartbeatTimer(pSyncNode);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t syncNodeSendMsgById(const SRaftId* destRaftId, SSyncNode* pNode, SRpcMsg* pMsg) {
|
||||
SEpSet* epSet = NULL;
|
||||
|
@ -1700,6 +1714,7 @@ _END:
|
|||
}
|
||||
|
||||
// raft state change --------------
|
||||
#ifdef BUILD_NO_CALL
|
||||
void syncNodeUpdateTerm(SSyncNode* pSyncNode, SyncTerm term) {
|
||||
if (term > raftStoreGetTerm(pSyncNode)) {
|
||||
raftStoreSetTerm(pSyncNode, term);
|
||||
|
@ -1709,6 +1724,7 @@ void syncNodeUpdateTerm(SSyncNode* pSyncNode, SyncTerm term) {
|
|||
raftStoreClearVote(pSyncNode);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void syncNodeUpdateTermWithoutStepDown(SSyncNode* pSyncNode, SyncTerm term) {
|
||||
if (term > raftStoreGetTerm(pSyncNode)) {
|
||||
|
@ -1934,6 +1950,7 @@ void syncNodeFollower2Candidate(SSyncNode* pSyncNode) {
|
|||
sNTrace(pSyncNode, "follower to candidate");
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
void syncNodeLeader2Follower(SSyncNode* pSyncNode) {
|
||||
ASSERT(pSyncNode->state == TAOS_SYNC_STATE_LEADER);
|
||||
syncNodeBecomeFollower(pSyncNode, "leader to follower");
|
||||
|
@ -1953,6 +1970,7 @@ void syncNodeCandidate2Follower(SSyncNode* pSyncNode) {
|
|||
|
||||
sNTrace(pSyncNode, "candidate to follower");
|
||||
}
|
||||
#endif
|
||||
|
||||
// just called by syncNodeVoteForSelf
|
||||
// need assert
|
||||
|
@ -2042,6 +2060,7 @@ int32_t syncNodeGetLastIndexTerm(SSyncNode* pSyncNode, SyncIndex* pLastIndex, Sy
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
// return append-entries first try index
|
||||
SyncIndex syncNodeSyncStartIndex(SSyncNode* pSyncNode) {
|
||||
SyncIndex syncStartIndex = syncNodeGetLastIndex(pSyncNode) + 1;
|
||||
|
@ -2129,6 +2148,7 @@ int32_t syncNodeGetPreIndexTerm(SSyncNode* pSyncNode, SyncIndex index, SyncIndex
|
|||
*pPreTerm = syncNodeGetPreTerm(pSyncNode, index);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void syncNodeEqPingTimer(void* param, void* tmrId) {
|
||||
if (!syncIsInit()) return;
|
||||
|
@ -2200,6 +2220,7 @@ static void syncNodeEqElectTimer(void* param, void* tmrId) {
|
|||
syncNodeRelease(pNode);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) {
|
||||
if (!syncIsInit()) return;
|
||||
|
||||
|
@ -2233,6 +2254,7 @@ static void syncNodeEqHeartbeatTimer(void* param, void* tmrId) {
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void syncNodeEqPeerHeartbeatTimer(void* param, void* tmrId) {
|
||||
int64_t hbDataRid = (int64_t)param;
|
||||
|
@ -2320,6 +2342,7 @@ static void syncNodeEqPeerHeartbeatTimer(void* param, void* tmrId) {
|
|||
syncNodeRelease(pSyncNode);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
static void deleteCacheEntry(const void* key, size_t keyLen, void* value, void* ud) {
|
||||
(void)ud;
|
||||
taosMemoryFree(value);
|
||||
|
@ -2339,6 +2362,7 @@ int32_t syncCacheEntry(SSyncLogStore* pLogStore, SSyncRaftEntry* pEntry, LRUHand
|
|||
|
||||
return code;
|
||||
}
|
||||
#endif
|
||||
|
||||
void syncBuildConfigFromReq(SAlterVnodeReplicaReq* pReq, SSyncCfg* cfg) { // TODO SAlterVnodeReplicaReq name is proper?
|
||||
cfg->replicaNum = 0;
|
||||
|
@ -2976,6 +3000,7 @@ static int32_t syncNodeAppendNoop(SSyncNode* ths) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
static int32_t syncNodeAppendNoopOld(SSyncNode* ths) {
|
||||
int32_t ret = 0;
|
||||
|
||||
|
@ -3004,6 +3029,7 @@ static int32_t syncNodeAppendNoopOld(SSyncNode* ths) {
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
|
||||
SyncHeartbeat* pMsg = pRpcMsg->pCont;
|
||||
|
@ -3121,6 +3147,7 @@ int32_t syncNodeOnHeartbeatReply(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
|
|||
return syncLogReplProcessHeartbeatReply(pMgr, ths, pMsg);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
int32_t syncNodeOnHeartbeatReplyOld(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
|
||||
SyncHeartbeatReply* pMsg = pRpcMsg->pCont;
|
||||
|
||||
|
@ -3136,6 +3163,7 @@ int32_t syncNodeOnHeartbeatReplyOld(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
|
|||
syncIndexMgrSetRecvTime(ths->pMatchIndex, &pMsg->srcId, tsMs);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t syncNodeOnLocalCmd(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
|
||||
SyncLocalCmd* pMsg = pRpcMsg->pCont;
|
||||
|
@ -3315,6 +3343,7 @@ SPeerState* syncNodeGetPeerState(SSyncNode* ths, const SRaftId* pDestId) {
|
|||
return pState;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
bool syncNodeNeedSendAppendEntries(SSyncNode* ths, const SRaftId* pDestId, const SyncAppendEntries* pMsg) {
|
||||
SPeerState* pState = syncNodeGetPeerState(ths, pDestId);
|
||||
if (pState == NULL) {
|
||||
|
@ -3356,3 +3385,4 @@ bool syncNodeCanChange(SSyncNode* pSyncNode) {
|
|||
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -18,10 +18,12 @@
|
|||
#include <stdlib.h>
|
||||
#include "talgo.h"
|
||||
|
||||
#if defined(WINDOWS_STASH) || defined(_ALPINE)
|
||||
int32_t qsortHelper(const void* p1, const void* p2, const void* param) {
|
||||
__compar_fn_t comparFn = param;
|
||||
return comparFn(p1, p2);
|
||||
}
|
||||
#endif
|
||||
|
||||
// todo refactor: 1) move away; 2) use merge sort instead; 3) qsort is not a stable sort actually.
|
||||
void taosSort(void* base, int64_t sz, int64_t width, __compar_fn_t compar) {
|
||||
|
|
|
@ -88,6 +88,7 @@ struct termios oldtio;
|
|||
|
||||
typedef struct FILE TdCmd;
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
void* taosLoadDll(const char* filename) {
|
||||
#if defined(WINDOWS)
|
||||
ASSERT(0);
|
||||
|
@ -140,6 +141,7 @@ void taosCloseDll(void* handle) {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
int taosSetConsoleEcho(bool on) {
|
||||
#if defined(WINDOWS)
|
||||
|
|
|
@ -115,6 +115,7 @@ void *taosInitScheduler(int32_t queueSize, int32_t numOfThreads, const char *lab
|
|||
return (void *)pSched;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
void *taosInitSchedulerWithInfo(int32_t queueSize, int32_t numOfThreads, const char *label, void *tmrCtrl) {
|
||||
SSchedQueue *pSched = taosInitScheduler(queueSize, numOfThreads, label, NULL);
|
||||
|
||||
|
@ -125,6 +126,7 @@ void *taosInitSchedulerWithInfo(int32_t queueSize, int32_t numOfThreads, const c
|
|||
|
||||
return pSched;
|
||||
}
|
||||
#endif
|
||||
|
||||
void *taosProcessSchedQueue(void *scheduler) {
|
||||
SSchedMsg msg;
|
||||
|
@ -241,6 +243,7 @@ void taosCleanUpScheduler(void *param) {
|
|||
// taosMemoryFree(pSched);
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
// for debug purpose, dump the scheduler status every 1min.
|
||||
void taosDumpSchedulerStatus(void *qhandle, void *tmrId) {
|
||||
SSchedQueue *pSched = (SSchedQueue *)qhandle;
|
||||
|
@ -255,3 +258,4 @@ void taosDumpSchedulerStatus(void *qhandle, void *tmrId) {
|
|||
|
||||
taosTmrReset(taosDumpSchedulerStatus, DUMP_SCHEDULER_TIME_WINDOW, pSched, pSched->pTmrCtrl, &pSched->pTimer);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -64,6 +64,7 @@ int64_t taosStrHumanToInt64(const char* str) {
|
|||
return val;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
void taosInt64ToHumanStr(int64_t val, char* outStr) {
|
||||
if (((val >= UNIT_ONE_EXBIBYTE) || (-val >= UNIT_ONE_EXBIBYTE)) && ((val % UNIT_ONE_EXBIBYTE) == 0)) {
|
||||
sprintf(outStr, "%qdE", (long long)val / UNIT_ONE_EXBIBYTE);
|
||||
|
@ -80,6 +81,7 @@ void taosInt64ToHumanStr(int64_t val, char* outStr) {
|
|||
} else
|
||||
sprintf(outStr, "%qd", (long long)val);
|
||||
}
|
||||
#endif
|
||||
|
||||
int32_t taosStrHumanToInt32(const char* str) {
|
||||
size_t sLen = strlen(str);
|
||||
|
@ -112,6 +114,7 @@ int32_t taosStrHumanToInt32(const char* str) {
|
|||
return val;
|
||||
}
|
||||
|
||||
#ifdef BUILD_NO_CALL
|
||||
void taosInt32ToHumanStr(int32_t val, char* outStr) {
|
||||
if (((val >= UNIT_ONE_GIBIBYTE) || (-val >= UNIT_ONE_GIBIBYTE)) && ((val % UNIT_ONE_GIBIBYTE) == 0)) {
|
||||
sprintf(outStr, "%qdG", (long long)val / UNIT_ONE_GIBIBYTE);
|
||||
|
@ -122,3 +125,4 @@ void taosInt32ToHumanStr(int32_t val, char* outStr) {
|
|||
} else
|
||||
sprintf(outStr, "%qd", (long long)val);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -27,6 +27,15 @@ from frame import *
|
|||
|
||||
|
||||
class TDTestCase(TBase):
|
||||
updatecfgDict = {
|
||||
'queryMaxConcurrentTables': '2K',
|
||||
'streamMax': '1M',
|
||||
'totalMemoryKB': '1G',
|
||||
#'rpcQueueMemoryAllowed': '1T',
|
||||
#'mndLogRetention': '1P',
|
||||
'streamBufferSize':'2G'
|
||||
}
|
||||
|
||||
def insertData(self):
|
||||
tdLog.info(f"insert data.")
|
||||
|
||||
|
@ -62,7 +71,7 @@ class TDTestCase(TBase):
|
|||
|
||||
# TSDB_FQDN_LEN = 128
|
||||
lname = "testhostnamelength"
|
||||
lname.rjust(130, 'a')
|
||||
lname.rjust(230, 'a')
|
||||
|
||||
# except test
|
||||
sql = f"show vgroups;"
|
||||
|
@ -72,6 +81,9 @@ class TDTestCase(TBase):
|
|||
etool.exeBinFile("taos", f'-a {lname} -s "{sql}" ', wait=False)
|
||||
etool.exeBinFile("taos", f'-p{lname} -s "{sql}" ', wait=False)
|
||||
etool.exeBinFile("taos", f'-w -s "{sql}" ', wait=False)
|
||||
etool.exeBinFile("taos", f'abc', wait=False)
|
||||
etool.exeBinFile("taos", f'-V', wait=False)
|
||||
etool.exeBinFile("taos", f'-?', wait=False)
|
||||
|
||||
# others
|
||||
etool.exeBinFile("taos", f'-N 200 -l 2048 -s "{sql}" ', wait=False)
|
||||
|
@ -121,6 +133,11 @@ class TDTestCase(TBase):
|
|||
time.sleep(3)
|
||||
eos.exe("pkill -9 taos")
|
||||
|
||||
# call enter password
|
||||
etool.exeBinFile("taos", f'-p', wait=False)
|
||||
time.sleep(1)
|
||||
eos.exe("pkill -9 taos")
|
||||
|
||||
# run
|
||||
def run(self):
|
||||
tdLog.debug(f"start to excute {__file__}")
|
||||
|
|
|
@ -211,7 +211,7 @@ function lcovFunc {
|
|||
'*/AccessBridgeCalls.c' '*/ttszip.c' '*/dataInserter.c' '*/tlinearhash.c' '*/tsimplehash.c' '*/tsdbDiskData.c'\
|
||||
'*/texpr.c' '*/runUdf.c' '*/schDbg.c' '*/syncIO.c' '*/tdbOs.c' '*/pushServer.c' '*/osLz4.c'\
|
||||
'*/tbase64.c' '*/tbuffer.c' '*/tdes.c' '*/texception.c' '*/examples/*' '*/tidpool.c' '*/tmempool.c'\
|
||||
'*/clientJniConnector.c' '*/clientTmqConnector.c' '*/version.c'\
|
||||
'*/clientJniConnector.c' '*/clientTmqConnector.c' '*/version.c' '*/build_version.cc'\
|
||||
'*/tthread.c' '*/tversion.c' '*/ctgDbg.c' '*/schDbg.c' '*/qwDbg.c' '*/tencode.h' \
|
||||
'*/shellAuto.c' '*/shellTire.c' '*/shellCommand.c'\
|
||||
'*/sql.c' '*/sql.y'\
|
||||
|
|
|
@ -244,7 +244,7 @@ static int32_t shellParseSingleOpt(int32_t key, char *arg) {
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32) || defined(_TD_DARWIN_64)
|
||||
int32_t shellParseArgsWithoutArgp(int argc, char *argv[]) {
|
||||
SShellArgs *pArgs = &shell.args;
|
||||
|
||||
|
@ -302,6 +302,7 @@ int32_t shellParseArgsWithoutArgp(int argc, char *argv[]) {
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void shellInitArgs(int argc, char *argv[]) {
|
||||
for (int i = 1; i < argc; i++) {
|
||||
|
|
Loading…
Reference in New Issue