Merge branch 'feature/sync2-merge' of https://github.com/taosdata/TDengine into feature/sync2-merge
This commit is contained in:
commit
1382242e17
|
@ -127,4 +127,5 @@ tools/THANKS
|
|||
tools/NEWS
|
||||
tools/COPYING
|
||||
tools/BUGS
|
||||
tools/taos-tools
|
||||
tools/taos-tools
|
||||
tools/taosws-rs
|
||||
|
|
|
@ -118,6 +118,7 @@ function kill_taosd() {
|
|||
}
|
||||
|
||||
function install_include() {
|
||||
${csudo}mkdir -p ${inc_link_dir}
|
||||
${csudo}rm -f ${inc_link_dir}/taos.h ${inc_link_dir}/taosdef.h ${inc_link_dir}/taoserror.h ${inc_link_dir}/taosudf.h || :
|
||||
[ -f ${inc_link_dir}/taosws.h ] && ${csudo}rm -f ${inc_link_dir}/taosws.h ||:
|
||||
|
||||
|
|
|
@ -46,38 +46,38 @@ int32_t genericRspCallback(void* param, SDataBuf* pMsg, int32_t code) {
|
|||
|
||||
int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
||||
SRequestObj* pRequest = param;
|
||||
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
taosMemoryFree(pMsg->pEpSet);
|
||||
taosMemoryFree(pMsg->pData);
|
||||
setErrno(pRequest, code);
|
||||
tsem_post(&pRequest->body.rspSem);
|
||||
return code;
|
||||
goto End;
|
||||
}
|
||||
|
||||
STscObj* pTscObj = pRequest->pTscObj;
|
||||
|
||||
SConnectRsp connectRsp = {0};
|
||||
tDeserializeSConnectRsp(pMsg->pData, pMsg->len, &connectRsp);
|
||||
if (tDeserializeSConnectRsp(pMsg->pData, pMsg->len, &connectRsp) != 0) {
|
||||
code = TSDB_CODE_TSC_INVALID_VERSION;
|
||||
setErrno(pRequest, code);
|
||||
tsem_post(&pRequest->body.rspSem);
|
||||
goto End;
|
||||
}
|
||||
|
||||
int32_t now = taosGetTimestampSec();
|
||||
int32_t delta = abs(now - connectRsp.svrTimestamp);
|
||||
if (delta > timestampDeltaLimit) {
|
||||
code = TSDB_CODE_TIME_UNSYNCED;
|
||||
tscError("time diff:%ds is too big", delta);
|
||||
taosMemoryFree(pMsg->pEpSet);
|
||||
taosMemoryFree(pMsg->pData);
|
||||
setErrno(pRequest, code);
|
||||
tsem_post(&pRequest->body.rspSem);
|
||||
return code;
|
||||
goto End;
|
||||
}
|
||||
|
||||
/*assert(connectRsp.epSet.numOfEps > 0);*/
|
||||
if (connectRsp.epSet.numOfEps == 0) {
|
||||
taosMemoryFree(pMsg->pEpSet);
|
||||
taosMemoryFree(pMsg->pData);
|
||||
setErrno(pRequest, TSDB_CODE_MND_APP_ERROR);
|
||||
tsem_post(&pRequest->body.rspSem);
|
||||
return code;
|
||||
goto End;
|
||||
}
|
||||
|
||||
if (connectRsp.dnodeNum == 1) {
|
||||
|
@ -113,14 +113,15 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
|||
|
||||
hbRegisterConn(pTscObj->pAppInfo->pAppHbMgr, pTscObj->id, connectRsp.clusterId, connectRsp.connType);
|
||||
|
||||
// pRequest->body.resInfo.pRspMsg = pMsg->pData;
|
||||
tscDebug("0x%" PRIx64 " clusterId:%" PRId64 ", totalConn:%" PRId64, pRequest->requestId, connectRsp.clusterId,
|
||||
pTscObj->pAppInfo->numOfConns);
|
||||
|
||||
taosMemoryFree(pMsg->pData);
|
||||
taosMemoryFree(pMsg->pEpSet);
|
||||
tsem_post(&pRequest->body.rspSem);
|
||||
return 0;
|
||||
End:
|
||||
|
||||
taosMemoryFree(pMsg->pEpSet);
|
||||
taosMemoryFree(pMsg->pData);
|
||||
return code;
|
||||
}
|
||||
|
||||
SMsgSendInfo* buildMsgInfoImpl(SRequestObj* pRequest) {
|
||||
|
@ -194,7 +195,7 @@ int32_t processUseDbRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
|||
SUseDbRsp usedbRsp = {0};
|
||||
tDeserializeSUseDbRsp(pMsg->pData, pMsg->len, &usedbRsp);
|
||||
|
||||
if(strlen(usedbRsp.db) == 0){
|
||||
if (strlen(usedbRsp.db) == 0) {
|
||||
return TSDB_CODE_MND_DB_NOT_EXIST;
|
||||
}
|
||||
|
||||
|
@ -292,7 +293,7 @@ int32_t processDropDbRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
|||
tDeserializeSDropDbRsp(pMsg->pData, pMsg->len, &dropdbRsp);
|
||||
|
||||
struct SCatalog* pCatalog = NULL;
|
||||
int32_t code = catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog);
|
||||
int32_t code = catalogGetHandle(pRequest->pTscObj->pAppInfo->clusterId, &pCatalog);
|
||||
if (TSDB_CODE_SUCCESS == code) {
|
||||
catalogRemoveDB(pCatalog, dropdbRsp.db, dropdbRsp.uid);
|
||||
}
|
||||
|
|
|
@ -2030,21 +2030,24 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SSDataBlock* pDataB
|
|||
tdAppendColValToRow(&rb, PRIMARYKEY_TIMESTAMP_COL_ID, TSDB_DATA_TYPE_TIMESTAMP, TD_VTYPE_NORM, var, true,
|
||||
offset, k);
|
||||
|
||||
} else if (colDataIsNull_s(pColInfoData, j)) {
|
||||
tdAppendColValToRow(&rb, PRIMARYKEY_TIMESTAMP_COL_ID + k, TSDB_DATA_TYPE_TIMESTAMP, TD_VTYPE_NULL, NULL,
|
||||
false, offset, k);
|
||||
} else {
|
||||
tdAppendColValToRow(&rb, PRIMARYKEY_TIMESTAMP_COL_ID + k, TSDB_DATA_TYPE_TIMESTAMP, TD_VTYPE_NORM, var,
|
||||
true, offset, k);
|
||||
}
|
||||
break;
|
||||
case TSDB_DATA_TYPE_NCHAR: {
|
||||
void* data = colDataGetData(pColInfoData, j);
|
||||
tdAppendColValToRow(&rb, PRIMARYKEY_TIMESTAMP_COL_ID + k, TSDB_DATA_TYPE_NCHAR, TD_VTYPE_NORM, data, true,
|
||||
offset, k);
|
||||
break;
|
||||
}
|
||||
case TSDB_DATA_TYPE_NCHAR:
|
||||
case TSDB_DATA_TYPE_VARCHAR: { // TSDB_DATA_TYPE_BINARY
|
||||
void* data = colDataGetData(pColInfoData, j);
|
||||
tdAppendColValToRow(&rb, PRIMARYKEY_TIMESTAMP_COL_ID + k, TSDB_DATA_TYPE_VARCHAR, TD_VTYPE_NORM, data, true,
|
||||
offset, k);
|
||||
if (colDataIsNull_s(pColInfoData, j)) {
|
||||
tdAppendColValToRow(&rb, PRIMARYKEY_TIMESTAMP_COL_ID + k, pColInfoData->info.type, TD_VTYPE_NULL, NULL,
|
||||
false, offset, k);
|
||||
} else {
|
||||
void* data = colDataGetData(pColInfoData, j);
|
||||
tdAppendColValToRow(&rb, PRIMARYKEY_TIMESTAMP_COL_ID + k, pColInfoData->info.type, TD_VTYPE_NORM, data,
|
||||
true, offset, k);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TSDB_DATA_TYPE_VARBINARY:
|
||||
|
@ -2057,7 +2060,10 @@ int32_t buildSubmitReqFromDataBlock(SSubmitReq** pReq, const SSDataBlock* pDataB
|
|||
break;
|
||||
default:
|
||||
if (pColInfoData->info.type < TSDB_DATA_TYPE_MAX && pColInfoData->info.type > TSDB_DATA_TYPE_NULL) {
|
||||
if (pCol->type == pColInfoData->info.type) {
|
||||
if (colDataIsNull_s(pColInfoData, j)) {
|
||||
tdAppendColValToRow(&rb, PRIMARYKEY_TIMESTAMP_COL_ID + k, pCol->type, TD_VTYPE_NULL, NULL, false, offset,
|
||||
k);
|
||||
} else if (pCol->type == pColInfoData->info.type) {
|
||||
tdAppendColValToRow(&rb, PRIMARYKEY_TIMESTAMP_COL_ID + k, pCol->type, TD_VTYPE_NORM, var, true, offset,
|
||||
k);
|
||||
} else {
|
||||
|
|
|
@ -66,7 +66,7 @@ void vmGetMonitorInfo(SVnodeMgmt *pMgmt, SMonVmInfo *pInfo) {
|
|||
|
||||
pInfo->vstat.totalVnodes = totalVnodes;
|
||||
pInfo->vstat.masterNum = masterNum;
|
||||
pInfo->vstat.numOfSelectReqs = numOfSelectReqs - pMgmt->state.numOfSelectReqs;
|
||||
pInfo->vstat.numOfSelectReqs = numOfSelectReqs;
|
||||
pInfo->vstat.numOfInsertReqs = numOfInsertReqs; // delta
|
||||
pInfo->vstat.numOfInsertSuccessReqs = numOfInsertSuccessReqs; // delta
|
||||
pInfo->vstat.numOfBatchInsertReqs = numOfBatchInsertReqs; // delta
|
||||
|
|
|
@ -15,10 +15,13 @@
|
|||
|
||||
#include "vnd.h"
|
||||
|
||||
#define VNODE_GET_LOAD_RESET_VALS(pVar, oVal, vType) \
|
||||
do { \
|
||||
int##vType##_t newVal = atomic_sub_fetch_##vType(&(pVar), (oVal)); \
|
||||
ASSERT(newVal >= 0); \
|
||||
#define VNODE_GET_LOAD_RESET_VALS(pVar, oVal, vType, tags) \
|
||||
do { \
|
||||
int##vType##_t newVal = atomic_sub_fetch_##vType(&(pVar), (oVal)); \
|
||||
ASSERT(newVal >= 0); \
|
||||
if (newVal < 0) { \
|
||||
vWarn("vgId:%d %s, abnormal val:%" PRIi64 ", old val:%" PRIi64, TD_VID(pVnode), tags, newVal, (oVal)); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
int vnodeQueryOpen(SVnode *pVnode) {
|
||||
|
@ -435,10 +438,10 @@ int32_t vnodeGetLoad(SVnode *pVnode, SVnodeLoad *pLoad) {
|
|||
* @param pLoad
|
||||
*/
|
||||
void vnodeResetLoad(SVnode *pVnode, SVnodeLoad *pLoad) {
|
||||
VNODE_GET_LOAD_RESET_VALS(pVnode->statis.nInsert, pLoad->numOfInsertReqs, 64);
|
||||
VNODE_GET_LOAD_RESET_VALS(pVnode->statis.nInsertSuccess, pLoad->numOfInsertSuccessReqs, 64);
|
||||
VNODE_GET_LOAD_RESET_VALS(pVnode->statis.nBatchInsert, pLoad->numOfBatchInsertReqs, 64);
|
||||
VNODE_GET_LOAD_RESET_VALS(pVnode->statis.nBatchInsertSuccess, pLoad->numOfBatchInsertSuccessReqs, 64);
|
||||
VNODE_GET_LOAD_RESET_VALS(pVnode->statis.nInsert, pLoad->numOfInsertReqs, 64, "nInsert");
|
||||
VNODE_GET_LOAD_RESET_VALS(pVnode->statis.nInsertSuccess, pLoad->numOfInsertSuccessReqs, 64, "nInsertSuccess");
|
||||
VNODE_GET_LOAD_RESET_VALS(pVnode->statis.nBatchInsert, pLoad->numOfBatchInsertReqs, 64, "nBatchInsert");
|
||||
VNODE_GET_LOAD_RESET_VALS(pVnode->statis.nBatchInsertSuccess, pLoad->numOfBatchInsertSuccessReqs, 64, "nBatchInsertSuccess");
|
||||
}
|
||||
|
||||
void vnodeGetInfo(SVnode *pVnode, const char **dbname, int32_t *vgId) {
|
||||
|
|
|
@ -2693,35 +2693,35 @@ int32_t syncNodeGetPreIndexTerm(SSyncNode* pSyncNode, SyncIndex index, SyncIndex
|
|||
// for debug --------------
|
||||
void syncNodePrint(SSyncNode* pObj) {
|
||||
char* serialized = syncNode2Str(pObj);
|
||||
printf("syncNodePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncNodePrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncNodePrint2(char* s, SSyncNode* pObj) {
|
||||
char* serialized = syncNode2Str(pObj);
|
||||
printf("syncNodePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncNodePrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncNodeLog(SSyncNode* pObj) {
|
||||
char* serialized = syncNode2Str(pObj);
|
||||
sTraceLong("syncNodeLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTraceLong("syncNodeLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncNodeLog2(char* s, SSyncNode* pObj) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncNode2Str(pObj);
|
||||
sTraceLong("syncNodeLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTraceLong("syncNodeLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
||||
void syncNodeLog3(char* s, SSyncNode* pObj) {
|
||||
char* serialized = syncNode2Str(pObj);
|
||||
sTraceLong("syncNodeLog3 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTraceLong("syncNodeLog3 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
|
|
|
@ -133,28 +133,28 @@ char* syncRpcMsg2Str(SRpcMsg* pRpcMsg) {
|
|||
// for debug ----------------------
|
||||
void syncRpcMsgPrint(SRpcMsg* pMsg) {
|
||||
char* serialized = syncRpcMsg2Str(pMsg);
|
||||
printf("syncRpcMsgPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncRpcMsgPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncRpcMsgPrint2(char* s, SRpcMsg* pMsg) {
|
||||
char* serialized = syncRpcMsg2Str(pMsg);
|
||||
printf("syncRpcMsgPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncRpcMsgPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncRpcMsgLog(SRpcMsg* pMsg) {
|
||||
char* serialized = syncRpcMsg2Str(pMsg);
|
||||
sTrace("syncRpcMsgLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncRpcMsgLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncRpcMsgLog2(char* s, SRpcMsg* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncRpcMsg2Str(pMsg);
|
||||
sTrace("syncRpcMsgLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncRpcMsgLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -271,21 +271,21 @@ void syncTimeoutPrint(const SyncTimeout* pMsg) {
|
|||
|
||||
void syncTimeoutPrint2(char* s, const SyncTimeout* pMsg) {
|
||||
char* serialized = syncTimeout2Str(pMsg);
|
||||
printf("syncTimeoutPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncTimeoutPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncTimeoutLog(const SyncTimeout* pMsg) {
|
||||
char* serialized = syncTimeout2Str(pMsg);
|
||||
sTrace("syncTimeoutLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncTimeoutLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncTimeoutLog2(char* s, const SyncTimeout* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncTimeout2Str(pMsg);
|
||||
sTrace("syncTimeoutLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncTimeoutLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -526,28 +526,28 @@ char* syncPing2Str(const SyncPing* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncPingPrint(const SyncPing* pMsg) {
|
||||
char* serialized = syncPing2Str(pMsg);
|
||||
printf("syncPingPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncPingPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncPingPrint2(char* s, const SyncPing* pMsg) {
|
||||
char* serialized = syncPing2Str(pMsg);
|
||||
printf("syncPingPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncPingPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncPingLog(const SyncPing* pMsg) {
|
||||
char* serialized = syncPing2Str(pMsg);
|
||||
sTrace("syncPingLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncPingLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncPingLog2(char* s, const SyncPing* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncPing2Str(pMsg);
|
||||
sTrace("syncPingLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncPingLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -931,28 +931,28 @@ char* syncClientRequest2Str(const SyncClientRequest* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncClientRequestPrint(const SyncClientRequest* pMsg) {
|
||||
char* serialized = syncClientRequest2Str(pMsg);
|
||||
printf("syncClientRequestPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncClientRequestPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncClientRequestPrint2(char* s, const SyncClientRequest* pMsg) {
|
||||
char* serialized = syncClientRequest2Str(pMsg);
|
||||
printf("syncClientRequestPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncClientRequestPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncClientRequestLog(const SyncClientRequest* pMsg) {
|
||||
char* serialized = syncClientRequest2Str(pMsg);
|
||||
sTrace("syncClientRequestLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncClientRequestLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncClientRequestLog2(char* s, const SyncClientRequest* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncClientRequest2Str(pMsg);
|
||||
sTrace("syncClientRequestLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncClientRequestLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -1101,28 +1101,28 @@ char* syncClientRequestBatch2Str(const SyncClientRequestBatch* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncClientRequestBatchPrint(const SyncClientRequestBatch* pMsg) {
|
||||
char* serialized = syncClientRequestBatch2Str(pMsg);
|
||||
printf("syncClientRequestBatchPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncClientRequestBatchPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncClientRequestBatchPrint2(char* s, const SyncClientRequestBatch* pMsg) {
|
||||
char* serialized = syncClientRequestBatch2Str(pMsg);
|
||||
printf("syncClientRequestBatchPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncClientRequestBatchPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncClientRequestBatchLog(const SyncClientRequestBatch* pMsg) {
|
||||
char* serialized = syncClientRequestBatch2Str(pMsg);
|
||||
sTrace("syncClientRequestBatchLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncClientRequestBatchLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncClientRequestBatchLog2(char* s, const SyncClientRequestBatch* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncClientRequestBatch2Str(pMsg);
|
||||
sTraceLong("syncClientRequestBatchLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTraceLong("syncClientRequestBatchLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -1252,28 +1252,28 @@ char* syncRequestVote2Str(const SyncRequestVote* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncRequestVotePrint(const SyncRequestVote* pMsg) {
|
||||
char* serialized = syncRequestVote2Str(pMsg);
|
||||
printf("syncRequestVotePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncRequestVotePrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncRequestVotePrint2(char* s, const SyncRequestVote* pMsg) {
|
||||
char* serialized = syncRequestVote2Str(pMsg);
|
||||
printf("syncRequestVotePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncRequestVotePrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncRequestVoteLog(const SyncRequestVote* pMsg) {
|
||||
char* serialized = syncRequestVote2Str(pMsg);
|
||||
sTrace("syncRequestVoteLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncRequestVoteLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncRequestVoteLog2(char* s, const SyncRequestVote* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncRequestVote2Str(pMsg);
|
||||
sTrace("syncRequestVoteLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncRequestVoteLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -1400,28 +1400,28 @@ char* syncRequestVoteReply2Str(const SyncRequestVoteReply* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncRequestVoteReplyPrint(const SyncRequestVoteReply* pMsg) {
|
||||
char* serialized = syncRequestVoteReply2Str(pMsg);
|
||||
printf("syncRequestVoteReplyPrint | len:%" PRId64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncRequestVoteReplyPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncRequestVoteReplyPrint2(char* s, const SyncRequestVoteReply* pMsg) {
|
||||
char* serialized = syncRequestVoteReply2Str(pMsg);
|
||||
printf("syncRequestVoteReplyPrint2 | len:%" PRId64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncRequestVoteReplyPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncRequestVoteReplyLog(const SyncRequestVoteReply* pMsg) {
|
||||
char* serialized = syncRequestVoteReply2Str(pMsg);
|
||||
sTrace("syncRequestVoteReplyLog | len:%" PRId64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncRequestVoteReplyLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncRequestVoteReplyLog2(char* s, const SyncRequestVoteReply* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncRequestVoteReply2Str(pMsg);
|
||||
sTrace("syncRequestVoteReplyLog2 | len:%" PRId64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncRequestVoteReplyLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -1571,28 +1571,28 @@ char* syncAppendEntries2Str(const SyncAppendEntries* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncAppendEntriesPrint(const SyncAppendEntries* pMsg) {
|
||||
char* serialized = syncAppendEntries2Str(pMsg);
|
||||
printf("syncAppendEntriesPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncAppendEntriesPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncAppendEntriesPrint2(char* s, const SyncAppendEntries* pMsg) {
|
||||
char* serialized = syncAppendEntries2Str(pMsg);
|
||||
printf("syncAppendEntriesPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncAppendEntriesPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncAppendEntriesLog(const SyncAppendEntries* pMsg) {
|
||||
char* serialized = syncAppendEntries2Str(pMsg);
|
||||
sTrace("syncAppendEntriesLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncAppendEntriesLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncAppendEntriesLog2(char* s, const SyncAppendEntries* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncAppendEntries2Str(pMsg);
|
||||
sTrace("syncAppendEntriesLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncAppendEntriesLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -1810,28 +1810,28 @@ char* syncAppendEntriesBatch2Str(const SyncAppendEntriesBatch* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncAppendEntriesBatchPrint(const SyncAppendEntriesBatch* pMsg) {
|
||||
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
||||
printf("syncAppendEntriesBatchPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncAppendEntriesBatchPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncAppendEntriesBatchPrint2(char* s, const SyncAppendEntriesBatch* pMsg) {
|
||||
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
||||
printf("syncAppendEntriesBatchPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncAppendEntriesBatchPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncAppendEntriesBatchLog(const SyncAppendEntriesBatch* pMsg) {
|
||||
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
||||
sTrace("syncAppendEntriesBatchLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncAppendEntriesBatchLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncAppendEntriesBatchLog2(char* s, const SyncAppendEntriesBatch* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
||||
sTraceLong("syncAppendEntriesBatchLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTraceLong("syncAppendEntriesBatchLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -1966,28 +1966,28 @@ char* syncAppendEntriesReply2Str(const SyncAppendEntriesReply* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncAppendEntriesReplyPrint(const SyncAppendEntriesReply* pMsg) {
|
||||
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
||||
printf("syncAppendEntriesReplyPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncAppendEntriesReplyPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncAppendEntriesReplyPrint2(char* s, const SyncAppendEntriesReply* pMsg) {
|
||||
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
||||
printf("syncAppendEntriesReplyPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncAppendEntriesReplyPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncAppendEntriesReplyLog(const SyncAppendEntriesReply* pMsg) {
|
||||
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
||||
sTrace("syncAppendEntriesReplyLog | len:%" PRIu64 "| %s", strlen(serialized), serialized);
|
||||
sTrace("syncAppendEntriesReplyLog | len:%d| %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncAppendEntriesReplyLog2(char* s, const SyncAppendEntriesReply* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
||||
sTrace("syncAppendEntriesReplyLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncAppendEntriesReplyLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -2119,28 +2119,28 @@ char* syncHeartbeat2Str(const SyncHeartbeat* pMsg) {
|
|||
|
||||
void syncHeartbeatPrint(const SyncHeartbeat* pMsg) {
|
||||
char* serialized = syncHeartbeat2Str(pMsg);
|
||||
printf("syncHeartbeatPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncHeartbeatPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncHeartbeatPrint2(char* s, const SyncHeartbeat* pMsg) {
|
||||
char* serialized = syncHeartbeat2Str(pMsg);
|
||||
printf("syncHeartbeatPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncHeartbeatPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncHeartbeatLog(const SyncHeartbeat* pMsg) {
|
||||
char* serialized = syncHeartbeat2Str(pMsg);
|
||||
sTrace("syncHeartbeatLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncHeartbeatLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncHeartbeatLog2(char* s, const SyncHeartbeat* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncHeartbeat2Str(pMsg);
|
||||
sTrace("syncHeartbeatLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncHeartbeatLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -2273,28 +2273,28 @@ char* syncHeartbeatReply2Str(const SyncHeartbeatReply* pMsg) {
|
|||
|
||||
void syncHeartbeatReplyPrint(const SyncHeartbeatReply* pMsg) {
|
||||
char* serialized = syncHeartbeatReply2Str(pMsg);
|
||||
printf("syncHeartbeatReplyPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncHeartbeatReplyPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncHeartbeatReplyPrint2(char* s, const SyncHeartbeatReply* pMsg) {
|
||||
char* serialized = syncHeartbeatReply2Str(pMsg);
|
||||
printf("syncHeartbeatReplyPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncHeartbeatReplyPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncHeartbeatReplyLog(const SyncHeartbeatReply* pMsg) {
|
||||
char* serialized = syncHeartbeatReply2Str(pMsg);
|
||||
sTrace("syncHeartbeatReplyLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncHeartbeatReplyLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncHeartbeatReplyLog2(char* s, const SyncHeartbeatReply* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncHeartbeatReply2Str(pMsg);
|
||||
sTrace("syncHeartbeatReplyLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncHeartbeatReplyLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -2426,28 +2426,28 @@ char* syncApplyMsg2Str(const SyncApplyMsg* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncApplyMsgPrint(const SyncApplyMsg* pMsg) {
|
||||
char* serialized = syncApplyMsg2Str(pMsg);
|
||||
printf("syncApplyMsgPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncApplyMsgPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncApplyMsgPrint2(char* s, const SyncApplyMsg* pMsg) {
|
||||
char* serialized = syncApplyMsg2Str(pMsg);
|
||||
printf("syncApplyMsgPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncApplyMsgPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncApplyMsgLog(const SyncApplyMsg* pMsg) {
|
||||
char* serialized = syncApplyMsg2Str(pMsg);
|
||||
sTrace("ssyncApplyMsgLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("ssyncApplyMsgLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncApplyMsgLog2(char* s, const SyncApplyMsg* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncApplyMsg2Str(pMsg);
|
||||
sTrace("syncApplyMsgLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncApplyMsgLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -2603,28 +2603,28 @@ char* syncSnapshotSend2Str(const SyncSnapshotSend* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncSnapshotSendPrint(const SyncSnapshotSend* pMsg) {
|
||||
char* serialized = syncSnapshotSend2Str(pMsg);
|
||||
printf("syncSnapshotSendPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncSnapshotSendPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncSnapshotSendPrint2(char* s, const SyncSnapshotSend* pMsg) {
|
||||
char* serialized = syncSnapshotSend2Str(pMsg);
|
||||
printf("syncSnapshotSendPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncSnapshotSendPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncSnapshotSendLog(const SyncSnapshotSend* pMsg) {
|
||||
char* serialized = syncSnapshotSend2Str(pMsg);
|
||||
sTrace("syncSnapshotSendLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncSnapshotSendLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncSnapshotSendLog2(char* s, const SyncSnapshotSend* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncSnapshotSend2Str(pMsg);
|
||||
sTrace("syncSnapshotSendLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncSnapshotSendLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -2763,28 +2763,28 @@ char* syncSnapshotRsp2Str(const SyncSnapshotRsp* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncSnapshotRspPrint(const SyncSnapshotRsp* pMsg) {
|
||||
char* serialized = syncSnapshotRsp2Str(pMsg);
|
||||
printf("syncSnapshotRspPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncSnapshotRspPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncSnapshotRspPrint2(char* s, const SyncSnapshotRsp* pMsg) {
|
||||
char* serialized = syncSnapshotRsp2Str(pMsg);
|
||||
printf("syncSnapshotRspPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncSnapshotRspPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncSnapshotRspLog(const SyncSnapshotRsp* pMsg) {
|
||||
char* serialized = syncSnapshotRsp2Str(pMsg);
|
||||
sTrace("syncSnapshotRspLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncSnapshotRspLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncSnapshotRspLog2(char* s, const SyncSnapshotRsp* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncSnapshotRsp2Str(pMsg);
|
||||
sTrace("syncSnapshotRspLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncSnapshotRspLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -2925,28 +2925,28 @@ char* syncLeaderTransfer2Str(const SyncLeaderTransfer* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncLeaderTransferPrint(const SyncLeaderTransfer* pMsg) {
|
||||
char* serialized = syncLeaderTransfer2Str(pMsg);
|
||||
printf("syncLeaderTransferPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncLeaderTransferPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncLeaderTransferPrint2(char* s, const SyncLeaderTransfer* pMsg) {
|
||||
char* serialized = syncLeaderTransfer2Str(pMsg);
|
||||
printf("syncLeaderTransferPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncLeaderTransferPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncLeaderTransferLog(const SyncLeaderTransfer* pMsg) {
|
||||
char* serialized = syncLeaderTransfer2Str(pMsg);
|
||||
sTrace("syncLeaderTransferLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncLeaderTransferLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncLeaderTransferLog2(char* s, const SyncLeaderTransfer* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncLeaderTransfer2Str(pMsg);
|
||||
sTrace("syncLeaderTransferLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncLeaderTransferLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -3054,28 +3054,28 @@ char* syncReconfigFinish2Str(const SyncReconfigFinish* pMsg) {
|
|||
// for debug ----------------------
|
||||
void syncReconfigFinishPrint(const SyncReconfigFinish* pMsg) {
|
||||
char* serialized = syncReconfigFinish2Str(pMsg);
|
||||
printf("syncReconfigFinishPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncReconfigFinishPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncReconfigFinishPrint2(char* s, const SyncReconfigFinish* pMsg) {
|
||||
char* serialized = syncReconfigFinish2Str(pMsg);
|
||||
printf("syncReconfigFinishPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncReconfigFinishPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncReconfigFinishLog(const SyncReconfigFinish* pMsg) {
|
||||
char* serialized = syncReconfigFinish2Str(pMsg);
|
||||
sTrace("syncReconfigFinishLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncReconfigFinishLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncReconfigFinishLog2(char* s, const SyncReconfigFinish* pMsg) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = syncReconfigFinish2Str(pMsg);
|
||||
sTrace("syncReconfigFinishLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncReconfigFinishLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -447,85 +447,85 @@ int32_t raftCfgFromStr(const char *s, SRaftCfg *pRaftCfg) {
|
|||
// for debug ----------------------
|
||||
void syncCfgPrint(SSyncCfg *pCfg) {
|
||||
char *serialized = syncCfg2Str(pCfg);
|
||||
printf("syncCfgPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("syncCfgPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncCfgPrint2(char *s, SSyncCfg *pCfg) {
|
||||
char *serialized = syncCfg2Str(pCfg);
|
||||
printf("syncCfgPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("syncCfgPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncCfgLog(SSyncCfg *pCfg) {
|
||||
char *serialized = syncCfg2Str(pCfg);
|
||||
sTrace("syncCfgLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("syncCfgLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncCfgLog2(char *s, SSyncCfg *pCfg) {
|
||||
char *serialized = syncCfg2Str(pCfg);
|
||||
sTrace("syncCfgLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncCfgLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void syncCfgLog3(char *s, SSyncCfg *pCfg) {
|
||||
char *serialized = syncCfg2SimpleStr(pCfg);
|
||||
sTrace("syncCfgLog3 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("syncCfgLog3 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCfgPrint(SRaftCfg *pCfg) {
|
||||
char *serialized = raftCfg2Str(pCfg);
|
||||
printf("raftCfgPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("raftCfgPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCfgPrint2(char *s, SRaftCfg *pCfg) {
|
||||
char *serialized = raftCfg2Str(pCfg);
|
||||
printf("raftCfgPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("raftCfgPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCfgLog(SRaftCfg *pCfg) {
|
||||
char *serialized = raftCfg2Str(pCfg);
|
||||
sTrace("raftCfgLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("raftCfgLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCfgLog2(char *s, SRaftCfg *pCfg) {
|
||||
char *serialized = raftCfg2Str(pCfg);
|
||||
sTrace("raftCfgLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("raftCfgLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
// ---------
|
||||
void raftCfgIndexPrint(SRaftCfgIndex *pCfg) {
|
||||
char *serialized = raftCfgIndex2Str(pCfg);
|
||||
printf("raftCfgIndexPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("raftCfgIndexPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCfgIndexPrint2(char *s, SRaftCfgIndex *pCfg) {
|
||||
char *serialized = raftCfgIndex2Str(pCfg);
|
||||
printf("raftCfgIndexPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("raftCfgIndexPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCfgIndexLog(SRaftCfgIndex *pCfg) {
|
||||
char *serialized = raftCfgIndex2Str(pCfg);
|
||||
sTrace("raftCfgIndexLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("raftCfgIndexLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCfgIndexLog2(char *s, SRaftCfgIndex *pCfg) {
|
||||
char *serialized = raftCfgIndex2Str(pCfg);
|
||||
sTrace("raftCfgIndexLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("raftCfgIndexLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
|
|
@ -418,28 +418,28 @@ char* raftCache2Str(SRaftEntryHashCache* pCache) {
|
|||
|
||||
void raftCachePrint(SRaftEntryHashCache* pCache) {
|
||||
char* serialized = raftCache2Str(pCache);
|
||||
printf("raftCachePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("raftCachePrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCachePrint2(char* s, SRaftEntryHashCache* pCache) {
|
||||
char* serialized = raftCache2Str(pCache);
|
||||
printf("raftCachePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("raftCachePrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCacheLog(SRaftEntryHashCache* pCache) {
|
||||
char* serialized = raftCache2Str(pCache);
|
||||
sTrace("raftCacheLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("raftCacheLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftCacheLog2(char* s, SRaftEntryHashCache* pCache) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = raftCache2Str(pCache);
|
||||
sTraceLong("raftCacheLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTraceLong("raftCacheLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -677,28 +677,28 @@ char* raftEntryCache2Str(SRaftEntryCache* pObj) {
|
|||
|
||||
void raftEntryCachePrint(SRaftEntryCache* pObj) {
|
||||
char* serialized = raftEntryCache2Str(pObj);
|
||||
printf("raftEntryCachePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("raftEntryCachePrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftEntryCachePrint2(char* s, SRaftEntryCache* pObj) {
|
||||
char* serialized = raftEntryCache2Str(pObj);
|
||||
printf("raftEntryCachePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("raftEntryCachePrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftEntryCacheLog(SRaftEntryCache* pObj) {
|
||||
char* serialized = raftEntryCache2Str(pObj);
|
||||
sTrace("raftEntryCacheLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("raftEntryCacheLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftEntryCacheLog2(char* s, SRaftEntryCache* pObj) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = raftEntryCache2Str(pObj);
|
||||
sTraceLong("raftEntryCacheLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTraceLong("raftEntryCacheLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -505,14 +505,14 @@ SyncIndex logStoreWalCommitVer(SSyncLogStore* pLogStore) {
|
|||
// for debug -----------------
|
||||
void logStorePrint(SSyncLogStore* pLogStore) {
|
||||
char* serialized = logStore2Str(pLogStore);
|
||||
printf("logStorePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("logStorePrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void logStorePrint2(char* s, SSyncLogStore* pLogStore) {
|
||||
char* serialized = logStore2Str(pLogStore);
|
||||
printf("logStorePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("logStorePrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ void logStorePrint2(char* s, SSyncLogStore* pLogStore) {
|
|||
void logStoreLog(SSyncLogStore* pLogStore) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = logStore2Str(pLogStore);
|
||||
sTraceLong("logStoreLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTraceLong("logStoreLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ void logStoreLog(SSyncLogStore* pLogStore) {
|
|||
void logStoreLog2(char* s, SSyncLogStore* pLogStore) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = logStore2Str(pLogStore);
|
||||
sTraceLong("logStoreLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTraceLong("logStoreLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
@ -536,28 +536,28 @@ void logStoreLog2(char* s, SSyncLogStore* pLogStore) {
|
|||
// for debug -----------------
|
||||
void logStoreSimplePrint(SSyncLogStore* pLogStore) {
|
||||
char* serialized = logStoreSimple2Str(pLogStore);
|
||||
printf("logStoreSimplePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("logStoreSimplePrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void logStoreSimplePrint2(char* s, SSyncLogStore* pLogStore) {
|
||||
char* serialized = logStoreSimple2Str(pLogStore);
|
||||
printf("logStoreSimplePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("logStoreSimplePrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void logStoreSimpleLog(SSyncLogStore* pLogStore) {
|
||||
char* serialized = logStoreSimple2Str(pLogStore);
|
||||
sTrace("logStoreSimpleLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("logStoreSimpleLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void logStoreSimpleLog2(char* s, SSyncLogStore* pLogStore) {
|
||||
if (gRaftDetailLog) {
|
||||
char* serialized = logStoreSimple2Str(pLogStore);
|
||||
sTrace("logStoreSimpleLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("logStoreSimpleLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -226,25 +226,25 @@ char *raftStore2Str(SRaftStore *pRaftStore) {
|
|||
// for debug -------------------
|
||||
void raftStorePrint(SRaftStore *pObj) {
|
||||
char *serialized = raftStore2Str(pObj);
|
||||
printf("raftStorePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("raftStorePrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftStorePrint2(char *s, SRaftStore *pObj) {
|
||||
char *serialized = raftStore2Str(pObj);
|
||||
printf("raftStorePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("raftStorePrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
void raftStoreLog(SRaftStore *pObj) {
|
||||
char *serialized = raftStore2Str(pObj);
|
||||
sTrace("raftStoreLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("raftStoreLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void raftStoreLog2(char *s, SRaftStore *pObj) {
|
||||
char *serialized = raftStore2Str(pObj);
|
||||
sTrace("raftStoreLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("raftStoreLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
|
|
@ -115,8 +115,8 @@ int32_t syncNodeOnTimer(SSyncNode* ths, SyncTimeout* pMsg) {
|
|||
} else if (pMsg->timeoutType == SYNC_TIMEOUT_ELECTION) {
|
||||
if (atomic_load_64(&ths->electTimerLogicClockUser) <= pMsg->logicClock) {
|
||||
++(ths->electTimerCounter);
|
||||
sTrace("vgId:%d, sync timer, type:election count:%lu, lc-user:%" PRId64, ths->vgId, ths->electTimerCounter,
|
||||
ths->electTimerLogicClockUser);
|
||||
sTrace("vgId:%d, sync timer, type:election count:%" PRIu64 ", lc-user:%" PRIu64, ths->vgId,
|
||||
ths->electTimerCounter, ths->electTimerLogicClockUser);
|
||||
|
||||
syncNodeElect(ths);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ int32_t syncNodeOnTimer(SSyncNode* ths, SyncTimeout* pMsg) {
|
|||
} else if (pMsg->timeoutType == SYNC_TIMEOUT_HEARTBEAT) {
|
||||
if (atomic_load_64(&ths->heartbeatTimerLogicClockUser) <= pMsg->logicClock) {
|
||||
++(ths->heartbeatTimerCounter);
|
||||
sTrace("vgId:%d, sync timer, type:replicate count:%" PRIu64 ", lc-user:%" PRId64, ths->vgId,
|
||||
sTrace("vgId:%d, sync timer, type:replicate count:%" PRIu64 ", lc-user:%" PRIu64, ths->vgId,
|
||||
ths->heartbeatTimerCounter, ths->heartbeatTimerLogicClockUser);
|
||||
|
||||
// syncNodeReplicate(ths, true);
|
||||
|
|
|
@ -138,27 +138,27 @@ char *voteGranted2Str(SVotesGranted *pVotesGranted) {
|
|||
// for debug -------------------
|
||||
void voteGrantedPrint(SVotesGranted *pObj) {
|
||||
char *serialized = voteGranted2Str(pObj);
|
||||
printf("voteGrantedPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("voteGrantedPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void voteGrantedPrint2(char *s, SVotesGranted *pObj) {
|
||||
char *serialized = voteGranted2Str(pObj);
|
||||
printf("voteGrantedPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("voteGrantedPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void voteGrantedLog(SVotesGranted *pObj) {
|
||||
char *serialized = voteGranted2Str(pObj);
|
||||
sTrace("voteGrantedLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("voteGrantedLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void voteGrantedLog2(char *s, SVotesGranted *pObj) {
|
||||
char *serialized = voteGranted2Str(pObj);
|
||||
sTrace("voteGrantedLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("voteGrantedLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
|
@ -267,26 +267,26 @@ char *votesRespond2Str(SVotesRespond *pVotesRespond) {
|
|||
// for debug -------------------
|
||||
void votesRespondPrint(SVotesRespond *pObj) {
|
||||
char *serialized = votesRespond2Str(pObj);
|
||||
printf("votesRespondPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||
printf("votesRespondPrint | len:%d | %s \n", (int32_t)strlen(serialized), serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void votesRespondPrint2(char *s, SVotesRespond *pObj) {
|
||||
char *serialized = votesRespond2Str(pObj);
|
||||
printf("votesRespondPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||
printf("votesRespondPrint2 | len:%d | %s | %s \n", (int32_t)strlen(serialized), s, serialized);
|
||||
fflush(NULL);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void votesRespondLog(SVotesRespond *pObj) {
|
||||
char *serialized = votesRespond2Str(pObj);
|
||||
sTrace("votesRespondLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||
sTrace("votesRespondLog | len:%d | %s", (int32_t)strlen(serialized), serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
||||
void votesRespondLog2(char *s, SVotesRespond *pObj) {
|
||||
char *serialized = votesRespond2Str(pObj);
|
||||
sTrace("votesRespondLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||
sTrace("votesRespondLog2 | len:%d | %s | %s", (int32_t)strlen(serialized), s, serialized);
|
||||
taosMemoryFree(serialized);
|
||||
}
|
||||
|
|
|
@ -388,8 +388,15 @@ char *taosDirEntryBaseName(char *name) {
|
|||
_splitpath(name, NULL, NULL, Filename1, Ext1);
|
||||
return name + (strlen(name) - strlen(Filename1) - strlen(Ext1));
|
||||
#else
|
||||
char *pPoint = strchr(name, '.');
|
||||
if (pPoint != NULL) pPoint = 0;
|
||||
if (name == NULL || (name[0] == '/' && name[1] == '\0')) return name;
|
||||
char *pPoint = strrchr(name, '/');
|
||||
if (pPoint != NULL) {
|
||||
if (*(pPoint + 1) == '\0') {
|
||||
*pPoint = '\0';
|
||||
return taosDirEntryBaseName(name);
|
||||
}
|
||||
return pPoint + 1;
|
||||
}
|
||||
return name;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -17,7 +17,8 @@ IF (TD_WEBSOCKET)
|
|||
PATCH_COMMAND
|
||||
COMMAND git clean -f -d
|
||||
BUILD_COMMAND
|
||||
COMMAND cargo build --release -p taos-ws-sys
|
||||
COMMAND cargo update
|
||||
COMMAND cargo build --release -p taos-ws-sys --features native-tls-vendored
|
||||
COMMAND ./taos-ws-sys/ci/package.sh
|
||||
INSTALL_COMMAND
|
||||
COMMAND cmake -E copy target/libtaosws/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib
|
||||
|
@ -36,7 +37,8 @@ IF (TD_WEBSOCKET)
|
|||
PATCH_COMMAND
|
||||
COMMAND git clean -f -d
|
||||
BUILD_COMMAND
|
||||
COMMAND cargo build --release -p taos-ws-sys
|
||||
COMMAND cargo update
|
||||
COMMAND cargo build --release -p taos-ws-sys --features native-tls-vendored
|
||||
COMMAND ./taos-ws-sys/ci/package.sh
|
||||
INSTALL_COMMAND
|
||||
COMMAND cmake -E copy target/libtaosws/${websocket_lib_file} ${CMAKE_BINARY_DIR}/build/lib
|
||||
|
|
Loading…
Reference in New Issue