fix: compile error
This commit is contained in:
parent
bf1fff7532
commit
15fade84d8
|
@ -2320,7 +2320,7 @@ void syncNodeStepDown(SSyncNode* pSyncNode, SyncTerm newTerm) {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
char logBuf[128];
|
char logBuf[128];
|
||||||
snprintf(logBuf, sizeof(logBuf), "step down, new-term:%lu, current-term:%lu", newTerm,
|
snprintf(logBuf, sizeof(logBuf), "step down, new-term:%" PRIu64 ", current-term:%" PRIu64, newTerm,
|
||||||
pSyncNode->pRaftStore->currentTerm);
|
pSyncNode->pRaftStore->currentTerm);
|
||||||
syncNodeEventLog(pSyncNode, logBuf);
|
syncNodeEventLog(pSyncNode, logBuf);
|
||||||
} while (0);
|
} while (0);
|
||||||
|
@ -3143,7 +3143,7 @@ int32_t syncDoLeaderTransfer(SSyncNode* ths, SRpcMsg* pRpcMsg, SSyncRaftEntry* p
|
||||||
|
|
||||||
if (pEntry->term < ths->pRaftStore->currentTerm) {
|
if (pEntry->term < ths->pRaftStore->currentTerm) {
|
||||||
char logBuf[128];
|
char logBuf[128];
|
||||||
snprintf(logBuf, sizeof(logBuf), "little term:%lu, can not do leader transfer", pEntry->term);
|
snprintf(logBuf, sizeof(logBuf), "little term:%" PRIu64 ", can not do leader transfer", pEntry->term);
|
||||||
syncNodeEventLog(ths, logBuf);
|
syncNodeEventLog(ths, logBuf);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -3534,7 +3534,7 @@ const char* syncTimerTypeStr(enum ESyncTimeoutType timerType) {
|
||||||
|
|
||||||
void syncLogRecvTimer(SSyncNode* pSyncNode, const SyncTimeout* pMsg, const char* s) {
|
void syncLogRecvTimer(SSyncNode* pSyncNode, const SyncTimeout* pMsg, const char* s) {
|
||||||
char logBuf[256];
|
char logBuf[256];
|
||||||
snprintf(logBuf, sizeof(logBuf), "recv sync-timer {type:%s, lc:%lu, ms:%d, data:%p}, %s",
|
snprintf(logBuf, sizeof(logBuf), "recv sync-timer {type:%s, lc:%" PRIu64 ", ms:%d, data:%p}, %s",
|
||||||
syncTimerTypeStr(pMsg->timeoutType), pMsg->logicClock, pMsg->timerMS, pMsg->data, s);
|
syncTimerTypeStr(pMsg->timeoutType), pMsg->logicClock, pMsg->timerMS, pMsg->data, s);
|
||||||
syncNodeEventLog(pSyncNode, logBuf);
|
syncNodeEventLog(pSyncNode, logBuf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,28 +133,28 @@ char* syncRpcMsg2Str(SRpcMsg* pRpcMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncRpcMsgPrint(SRpcMsg* pMsg) {
|
void syncRpcMsgPrint(SRpcMsg* pMsg) {
|
||||||
char* serialized = syncRpcMsg2Str(pMsg);
|
char* serialized = syncRpcMsg2Str(pMsg);
|
||||||
printf("syncRpcMsgPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncRpcMsgPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncRpcMsgPrint2(char* s, SRpcMsg* pMsg) {
|
void syncRpcMsgPrint2(char* s, SRpcMsg* pMsg) {
|
||||||
char* serialized = syncRpcMsg2Str(pMsg);
|
char* serialized = syncRpcMsg2Str(pMsg);
|
||||||
printf("syncRpcMsgPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncRpcMsgPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncRpcMsgLog(SRpcMsg* pMsg) {
|
void syncRpcMsgLog(SRpcMsg* pMsg) {
|
||||||
char* serialized = syncRpcMsg2Str(pMsg);
|
char* serialized = syncRpcMsg2Str(pMsg);
|
||||||
sTrace("syncRpcMsgLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncRpcMsgLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncRpcMsgLog2(char* s, SRpcMsg* pMsg) {
|
void syncRpcMsgLog2(char* s, SRpcMsg* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncRpcMsg2Str(pMsg);
|
char* serialized = syncRpcMsg2Str(pMsg);
|
||||||
sTrace("syncRpcMsgLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncRpcMsgLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -271,21 +271,21 @@ void syncTimeoutPrint(const SyncTimeout* pMsg) {
|
||||||
|
|
||||||
void syncTimeoutPrint2(char* s, const SyncTimeout* pMsg) {
|
void syncTimeoutPrint2(char* s, const SyncTimeout* pMsg) {
|
||||||
char* serialized = syncTimeout2Str(pMsg);
|
char* serialized = syncTimeout2Str(pMsg);
|
||||||
printf("syncTimeoutPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncTimeoutPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncTimeoutLog(const SyncTimeout* pMsg) {
|
void syncTimeoutLog(const SyncTimeout* pMsg) {
|
||||||
char* serialized = syncTimeout2Str(pMsg);
|
char* serialized = syncTimeout2Str(pMsg);
|
||||||
sTrace("syncTimeoutLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncTimeoutLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncTimeoutLog2(char* s, const SyncTimeout* pMsg) {
|
void syncTimeoutLog2(char* s, const SyncTimeout* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncTimeout2Str(pMsg);
|
char* serialized = syncTimeout2Str(pMsg);
|
||||||
sTrace("syncTimeoutLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncTimeoutLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -526,28 +526,28 @@ char* syncPing2Str(const SyncPing* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncPingPrint(const SyncPing* pMsg) {
|
void syncPingPrint(const SyncPing* pMsg) {
|
||||||
char* serialized = syncPing2Str(pMsg);
|
char* serialized = syncPing2Str(pMsg);
|
||||||
printf("syncPingPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncPingPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncPingPrint2(char* s, const SyncPing* pMsg) {
|
void syncPingPrint2(char* s, const SyncPing* pMsg) {
|
||||||
char* serialized = syncPing2Str(pMsg);
|
char* serialized = syncPing2Str(pMsg);
|
||||||
printf("syncPingPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncPingPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncPingLog(const SyncPing* pMsg) {
|
void syncPingLog(const SyncPing* pMsg) {
|
||||||
char* serialized = syncPing2Str(pMsg);
|
char* serialized = syncPing2Str(pMsg);
|
||||||
sTrace("syncPingLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncPingLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncPingLog2(char* s, const SyncPing* pMsg) {
|
void syncPingLog2(char* s, const SyncPing* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncPing2Str(pMsg);
|
char* serialized = syncPing2Str(pMsg);
|
||||||
sTrace("syncPingLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncPingLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -931,28 +931,28 @@ char* syncClientRequest2Str(const SyncClientRequest* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncClientRequestPrint(const SyncClientRequest* pMsg) {
|
void syncClientRequestPrint(const SyncClientRequest* pMsg) {
|
||||||
char* serialized = syncClientRequest2Str(pMsg);
|
char* serialized = syncClientRequest2Str(pMsg);
|
||||||
printf("syncClientRequestPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncClientRequestPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncClientRequestPrint2(char* s, const SyncClientRequest* pMsg) {
|
void syncClientRequestPrint2(char* s, const SyncClientRequest* pMsg) {
|
||||||
char* serialized = syncClientRequest2Str(pMsg);
|
char* serialized = syncClientRequest2Str(pMsg);
|
||||||
printf("syncClientRequestPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncClientRequestPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncClientRequestLog(const SyncClientRequest* pMsg) {
|
void syncClientRequestLog(const SyncClientRequest* pMsg) {
|
||||||
char* serialized = syncClientRequest2Str(pMsg);
|
char* serialized = syncClientRequest2Str(pMsg);
|
||||||
sTrace("syncClientRequestLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncClientRequestLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncClientRequestLog2(char* s, const SyncClientRequest* pMsg) {
|
void syncClientRequestLog2(char* s, const SyncClientRequest* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncClientRequest2Str(pMsg);
|
char* serialized = syncClientRequest2Str(pMsg);
|
||||||
sTrace("syncClientRequestLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncClientRequestLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1101,28 +1101,28 @@ char* syncClientRequestBatch2Str(const SyncClientRequestBatch* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncClientRequestBatchPrint(const SyncClientRequestBatch* pMsg) {
|
void syncClientRequestBatchPrint(const SyncClientRequestBatch* pMsg) {
|
||||||
char* serialized = syncClientRequestBatch2Str(pMsg);
|
char* serialized = syncClientRequestBatch2Str(pMsg);
|
||||||
printf("syncClientRequestBatchPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncClientRequestBatchPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncClientRequestBatchPrint2(char* s, const SyncClientRequestBatch* pMsg) {
|
void syncClientRequestBatchPrint2(char* s, const SyncClientRequestBatch* pMsg) {
|
||||||
char* serialized = syncClientRequestBatch2Str(pMsg);
|
char* serialized = syncClientRequestBatch2Str(pMsg);
|
||||||
printf("syncClientRequestBatchPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncClientRequestBatchPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncClientRequestBatchLog(const SyncClientRequestBatch* pMsg) {
|
void syncClientRequestBatchLog(const SyncClientRequestBatch* pMsg) {
|
||||||
char* serialized = syncClientRequestBatch2Str(pMsg);
|
char* serialized = syncClientRequestBatch2Str(pMsg);
|
||||||
sTrace("syncClientRequestBatchLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncClientRequestBatchLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncClientRequestBatchLog2(char* s, const SyncClientRequestBatch* pMsg) {
|
void syncClientRequestBatchLog2(char* s, const SyncClientRequestBatch* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncClientRequestBatch2Str(pMsg);
|
char* serialized = syncClientRequestBatch2Str(pMsg);
|
||||||
sTraceLong("syncClientRequestBatchLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTraceLong("syncClientRequestBatchLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1252,28 +1252,28 @@ char* syncRequestVote2Str(const SyncRequestVote* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncRequestVotePrint(const SyncRequestVote* pMsg) {
|
void syncRequestVotePrint(const SyncRequestVote* pMsg) {
|
||||||
char* serialized = syncRequestVote2Str(pMsg);
|
char* serialized = syncRequestVote2Str(pMsg);
|
||||||
printf("syncRequestVotePrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncRequestVotePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncRequestVotePrint2(char* s, const SyncRequestVote* pMsg) {
|
void syncRequestVotePrint2(char* s, const SyncRequestVote* pMsg) {
|
||||||
char* serialized = syncRequestVote2Str(pMsg);
|
char* serialized = syncRequestVote2Str(pMsg);
|
||||||
printf("syncRequestVotePrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncRequestVotePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncRequestVoteLog(const SyncRequestVote* pMsg) {
|
void syncRequestVoteLog(const SyncRequestVote* pMsg) {
|
||||||
char* serialized = syncRequestVote2Str(pMsg);
|
char* serialized = syncRequestVote2Str(pMsg);
|
||||||
sTrace("syncRequestVoteLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncRequestVoteLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncRequestVoteLog2(char* s, const SyncRequestVote* pMsg) {
|
void syncRequestVoteLog2(char* s, const SyncRequestVote* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncRequestVote2Str(pMsg);
|
char* serialized = syncRequestVote2Str(pMsg);
|
||||||
sTrace("syncRequestVoteLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncRequestVoteLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1571,28 +1571,28 @@ char* syncAppendEntries2Str(const SyncAppendEntries* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncAppendEntriesPrint(const SyncAppendEntries* pMsg) {
|
void syncAppendEntriesPrint(const SyncAppendEntries* pMsg) {
|
||||||
char* serialized = syncAppendEntries2Str(pMsg);
|
char* serialized = syncAppendEntries2Str(pMsg);
|
||||||
printf("syncAppendEntriesPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncAppendEntriesPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncAppendEntriesPrint2(char* s, const SyncAppendEntries* pMsg) {
|
void syncAppendEntriesPrint2(char* s, const SyncAppendEntries* pMsg) {
|
||||||
char* serialized = syncAppendEntries2Str(pMsg);
|
char* serialized = syncAppendEntries2Str(pMsg);
|
||||||
printf("syncAppendEntriesPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncAppendEntriesPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncAppendEntriesLog(const SyncAppendEntries* pMsg) {
|
void syncAppendEntriesLog(const SyncAppendEntries* pMsg) {
|
||||||
char* serialized = syncAppendEntries2Str(pMsg);
|
char* serialized = syncAppendEntries2Str(pMsg);
|
||||||
sTrace("syncAppendEntriesLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncAppendEntriesLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncAppendEntriesLog2(char* s, const SyncAppendEntries* pMsg) {
|
void syncAppendEntriesLog2(char* s, const SyncAppendEntries* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncAppendEntries2Str(pMsg);
|
char* serialized = syncAppendEntries2Str(pMsg);
|
||||||
sTrace("syncAppendEntriesLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncAppendEntriesLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1810,28 +1810,28 @@ char* syncAppendEntriesBatch2Str(const SyncAppendEntriesBatch* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncAppendEntriesBatchPrint(const SyncAppendEntriesBatch* pMsg) {
|
void syncAppendEntriesBatchPrint(const SyncAppendEntriesBatch* pMsg) {
|
||||||
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
||||||
printf("syncAppendEntriesBatchPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncAppendEntriesBatchPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncAppendEntriesBatchPrint2(char* s, const SyncAppendEntriesBatch* pMsg) {
|
void syncAppendEntriesBatchPrint2(char* s, const SyncAppendEntriesBatch* pMsg) {
|
||||||
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
||||||
printf("syncAppendEntriesBatchPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncAppendEntriesBatchPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncAppendEntriesBatchLog(const SyncAppendEntriesBatch* pMsg) {
|
void syncAppendEntriesBatchLog(const SyncAppendEntriesBatch* pMsg) {
|
||||||
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
||||||
sTrace("syncAppendEntriesBatchLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncAppendEntriesBatchLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncAppendEntriesBatchLog2(char* s, const SyncAppendEntriesBatch* pMsg) {
|
void syncAppendEntriesBatchLog2(char* s, const SyncAppendEntriesBatch* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
char* serialized = syncAppendEntriesBatch2Str(pMsg);
|
||||||
sTraceLong("syncAppendEntriesBatchLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTraceLong("syncAppendEntriesBatchLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1966,28 +1966,28 @@ char* syncAppendEntriesReply2Str(const SyncAppendEntriesReply* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncAppendEntriesReplyPrint(const SyncAppendEntriesReply* pMsg) {
|
void syncAppendEntriesReplyPrint(const SyncAppendEntriesReply* pMsg) {
|
||||||
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
||||||
printf("syncAppendEntriesReplyPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncAppendEntriesReplyPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncAppendEntriesReplyPrint2(char* s, const SyncAppendEntriesReply* pMsg) {
|
void syncAppendEntriesReplyPrint2(char* s, const SyncAppendEntriesReply* pMsg) {
|
||||||
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
||||||
printf("syncAppendEntriesReplyPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncAppendEntriesReplyPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncAppendEntriesReplyLog(const SyncAppendEntriesReply* pMsg) {
|
void syncAppendEntriesReplyLog(const SyncAppendEntriesReply* pMsg) {
|
||||||
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
||||||
sTrace("syncAppendEntriesReplyLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncAppendEntriesReplyLog | len:%" PRIu64 "| %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncAppendEntriesReplyLog2(char* s, const SyncAppendEntriesReply* pMsg) {
|
void syncAppendEntriesReplyLog2(char* s, const SyncAppendEntriesReply* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
char* serialized = syncAppendEntriesReply2Str(pMsg);
|
||||||
sTrace("syncAppendEntriesReplyLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncAppendEntriesReplyLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2119,28 +2119,28 @@ char* syncHeartbeat2Str(const SyncHeartbeat* pMsg) {
|
||||||
|
|
||||||
void syncHeartbeatPrint(const SyncHeartbeat* pMsg) {
|
void syncHeartbeatPrint(const SyncHeartbeat* pMsg) {
|
||||||
char* serialized = syncHeartbeat2Str(pMsg);
|
char* serialized = syncHeartbeat2Str(pMsg);
|
||||||
printf("syncHeartbeatPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncHeartbeatPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncHeartbeatPrint2(char* s, const SyncHeartbeat* pMsg) {
|
void syncHeartbeatPrint2(char* s, const SyncHeartbeat* pMsg) {
|
||||||
char* serialized = syncHeartbeat2Str(pMsg);
|
char* serialized = syncHeartbeat2Str(pMsg);
|
||||||
printf("syncHeartbeatPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncHeartbeatPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncHeartbeatLog(const SyncHeartbeat* pMsg) {
|
void syncHeartbeatLog(const SyncHeartbeat* pMsg) {
|
||||||
char* serialized = syncHeartbeat2Str(pMsg);
|
char* serialized = syncHeartbeat2Str(pMsg);
|
||||||
sTrace("syncHeartbeatLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncHeartbeatLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncHeartbeatLog2(char* s, const SyncHeartbeat* pMsg) {
|
void syncHeartbeatLog2(char* s, const SyncHeartbeat* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncHeartbeat2Str(pMsg);
|
char* serialized = syncHeartbeat2Str(pMsg);
|
||||||
sTrace("syncHeartbeatLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncHeartbeatLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2273,28 +2273,28 @@ char* syncHeartbeatReply2Str(const SyncHeartbeatReply* pMsg) {
|
||||||
|
|
||||||
void syncHeartbeatReplyPrint(const SyncHeartbeatReply* pMsg) {
|
void syncHeartbeatReplyPrint(const SyncHeartbeatReply* pMsg) {
|
||||||
char* serialized = syncHeartbeatReply2Str(pMsg);
|
char* serialized = syncHeartbeatReply2Str(pMsg);
|
||||||
printf("syncHeartbeatReplyPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncHeartbeatReplyPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncHeartbeatReplyPrint2(char* s, const SyncHeartbeatReply* pMsg) {
|
void syncHeartbeatReplyPrint2(char* s, const SyncHeartbeatReply* pMsg) {
|
||||||
char* serialized = syncHeartbeatReply2Str(pMsg);
|
char* serialized = syncHeartbeatReply2Str(pMsg);
|
||||||
printf("syncHeartbeatReplyPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncHeartbeatReplyPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncHeartbeatReplyLog(const SyncHeartbeatReply* pMsg) {
|
void syncHeartbeatReplyLog(const SyncHeartbeatReply* pMsg) {
|
||||||
char* serialized = syncHeartbeatReply2Str(pMsg);
|
char* serialized = syncHeartbeatReply2Str(pMsg);
|
||||||
sTrace("syncHeartbeatReplyLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncHeartbeatReplyLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncHeartbeatReplyLog2(char* s, const SyncHeartbeatReply* pMsg) {
|
void syncHeartbeatReplyLog2(char* s, const SyncHeartbeatReply* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncHeartbeatReply2Str(pMsg);
|
char* serialized = syncHeartbeatReply2Str(pMsg);
|
||||||
sTrace("syncHeartbeatReplyLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncHeartbeatReplyLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2426,28 +2426,28 @@ char* syncApplyMsg2Str(const SyncApplyMsg* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncApplyMsgPrint(const SyncApplyMsg* pMsg) {
|
void syncApplyMsgPrint(const SyncApplyMsg* pMsg) {
|
||||||
char* serialized = syncApplyMsg2Str(pMsg);
|
char* serialized = syncApplyMsg2Str(pMsg);
|
||||||
printf("syncApplyMsgPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncApplyMsgPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncApplyMsgPrint2(char* s, const SyncApplyMsg* pMsg) {
|
void syncApplyMsgPrint2(char* s, const SyncApplyMsg* pMsg) {
|
||||||
char* serialized = syncApplyMsg2Str(pMsg);
|
char* serialized = syncApplyMsg2Str(pMsg);
|
||||||
printf("syncApplyMsgPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncApplyMsgPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncApplyMsgLog(const SyncApplyMsg* pMsg) {
|
void syncApplyMsgLog(const SyncApplyMsg* pMsg) {
|
||||||
char* serialized = syncApplyMsg2Str(pMsg);
|
char* serialized = syncApplyMsg2Str(pMsg);
|
||||||
sTrace("ssyncApplyMsgLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("ssyncApplyMsgLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncApplyMsgLog2(char* s, const SyncApplyMsg* pMsg) {
|
void syncApplyMsgLog2(char* s, const SyncApplyMsg* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncApplyMsg2Str(pMsg);
|
char* serialized = syncApplyMsg2Str(pMsg);
|
||||||
sTrace("syncApplyMsgLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncApplyMsgLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2603,28 +2603,28 @@ char* syncSnapshotSend2Str(const SyncSnapshotSend* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncSnapshotSendPrint(const SyncSnapshotSend* pMsg) {
|
void syncSnapshotSendPrint(const SyncSnapshotSend* pMsg) {
|
||||||
char* serialized = syncSnapshotSend2Str(pMsg);
|
char* serialized = syncSnapshotSend2Str(pMsg);
|
||||||
printf("syncSnapshotSendPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncSnapshotSendPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncSnapshotSendPrint2(char* s, const SyncSnapshotSend* pMsg) {
|
void syncSnapshotSendPrint2(char* s, const SyncSnapshotSend* pMsg) {
|
||||||
char* serialized = syncSnapshotSend2Str(pMsg);
|
char* serialized = syncSnapshotSend2Str(pMsg);
|
||||||
printf("syncSnapshotSendPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncSnapshotSendPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncSnapshotSendLog(const SyncSnapshotSend* pMsg) {
|
void syncSnapshotSendLog(const SyncSnapshotSend* pMsg) {
|
||||||
char* serialized = syncSnapshotSend2Str(pMsg);
|
char* serialized = syncSnapshotSend2Str(pMsg);
|
||||||
sTrace("syncSnapshotSendLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncSnapshotSendLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncSnapshotSendLog2(char* s, const SyncSnapshotSend* pMsg) {
|
void syncSnapshotSendLog2(char* s, const SyncSnapshotSend* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncSnapshotSend2Str(pMsg);
|
char* serialized = syncSnapshotSend2Str(pMsg);
|
||||||
sTrace("syncSnapshotSendLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncSnapshotSendLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2763,28 +2763,28 @@ char* syncSnapshotRsp2Str(const SyncSnapshotRsp* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncSnapshotRspPrint(const SyncSnapshotRsp* pMsg) {
|
void syncSnapshotRspPrint(const SyncSnapshotRsp* pMsg) {
|
||||||
char* serialized = syncSnapshotRsp2Str(pMsg);
|
char* serialized = syncSnapshotRsp2Str(pMsg);
|
||||||
printf("syncSnapshotRspPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncSnapshotRspPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncSnapshotRspPrint2(char* s, const SyncSnapshotRsp* pMsg) {
|
void syncSnapshotRspPrint2(char* s, const SyncSnapshotRsp* pMsg) {
|
||||||
char* serialized = syncSnapshotRsp2Str(pMsg);
|
char* serialized = syncSnapshotRsp2Str(pMsg);
|
||||||
printf("syncSnapshotRspPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncSnapshotRspPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncSnapshotRspLog(const SyncSnapshotRsp* pMsg) {
|
void syncSnapshotRspLog(const SyncSnapshotRsp* pMsg) {
|
||||||
char* serialized = syncSnapshotRsp2Str(pMsg);
|
char* serialized = syncSnapshotRsp2Str(pMsg);
|
||||||
sTrace("syncSnapshotRspLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncSnapshotRspLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncSnapshotRspLog2(char* s, const SyncSnapshotRsp* pMsg) {
|
void syncSnapshotRspLog2(char* s, const SyncSnapshotRsp* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncSnapshotRsp2Str(pMsg);
|
char* serialized = syncSnapshotRsp2Str(pMsg);
|
||||||
sTrace("syncSnapshotRspLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncSnapshotRspLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2925,28 +2925,28 @@ char* syncLeaderTransfer2Str(const SyncLeaderTransfer* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncLeaderTransferPrint(const SyncLeaderTransfer* pMsg) {
|
void syncLeaderTransferPrint(const SyncLeaderTransfer* pMsg) {
|
||||||
char* serialized = syncLeaderTransfer2Str(pMsg);
|
char* serialized = syncLeaderTransfer2Str(pMsg);
|
||||||
printf("syncLeaderTransferPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncLeaderTransferPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncLeaderTransferPrint2(char* s, const SyncLeaderTransfer* pMsg) {
|
void syncLeaderTransferPrint2(char* s, const SyncLeaderTransfer* pMsg) {
|
||||||
char* serialized = syncLeaderTransfer2Str(pMsg);
|
char* serialized = syncLeaderTransfer2Str(pMsg);
|
||||||
printf("syncLeaderTransferPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncLeaderTransferPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncLeaderTransferLog(const SyncLeaderTransfer* pMsg) {
|
void syncLeaderTransferLog(const SyncLeaderTransfer* pMsg) {
|
||||||
char* serialized = syncLeaderTransfer2Str(pMsg);
|
char* serialized = syncLeaderTransfer2Str(pMsg);
|
||||||
sTrace("syncLeaderTransferLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncLeaderTransferLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncLeaderTransferLog2(char* s, const SyncLeaderTransfer* pMsg) {
|
void syncLeaderTransferLog2(char* s, const SyncLeaderTransfer* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncLeaderTransfer2Str(pMsg);
|
char* serialized = syncLeaderTransfer2Str(pMsg);
|
||||||
sTrace("syncLeaderTransferLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncLeaderTransferLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3054,28 +3054,28 @@ char* syncReconfigFinish2Str(const SyncReconfigFinish* pMsg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncReconfigFinishPrint(const SyncReconfigFinish* pMsg) {
|
void syncReconfigFinishPrint(const SyncReconfigFinish* pMsg) {
|
||||||
char* serialized = syncReconfigFinish2Str(pMsg);
|
char* serialized = syncReconfigFinish2Str(pMsg);
|
||||||
printf("syncReconfigFinishPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncReconfigFinishPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncReconfigFinishPrint2(char* s, const SyncReconfigFinish* pMsg) {
|
void syncReconfigFinishPrint2(char* s, const SyncReconfigFinish* pMsg) {
|
||||||
char* serialized = syncReconfigFinish2Str(pMsg);
|
char* serialized = syncReconfigFinish2Str(pMsg);
|
||||||
printf("syncReconfigFinishPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncReconfigFinishPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncReconfigFinishLog(const SyncReconfigFinish* pMsg) {
|
void syncReconfigFinishLog(const SyncReconfigFinish* pMsg) {
|
||||||
char* serialized = syncReconfigFinish2Str(pMsg);
|
char* serialized = syncReconfigFinish2Str(pMsg);
|
||||||
sTrace("syncReconfigFinishLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncReconfigFinishLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncReconfigFinishLog2(char* s, const SyncReconfigFinish* pMsg) {
|
void syncReconfigFinishLog2(char* s, const SyncReconfigFinish* pMsg) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = syncReconfigFinish2Str(pMsg);
|
char* serialized = syncReconfigFinish2Str(pMsg);
|
||||||
sTrace("syncReconfigFinishLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncReconfigFinishLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ SRaftCfgIndex *raftCfgIndexOpen(const char *path) {
|
||||||
taosLSeekFile(pRaftCfgIndex->pFile, 0, SEEK_SET);
|
taosLSeekFile(pRaftCfgIndex->pFile, 0, SEEK_SET);
|
||||||
|
|
||||||
int32_t bufLen = MAX_CONFIG_INDEX_COUNT * 16;
|
int32_t bufLen = MAX_CONFIG_INDEX_COUNT * 16;
|
||||||
char * pBuf = taosMemoryMalloc(bufLen);
|
char *pBuf = taosMemoryMalloc(bufLen);
|
||||||
memset(pBuf, 0, bufLen);
|
memset(pBuf, 0, bufLen);
|
||||||
int64_t len = taosReadFile(pRaftCfgIndex->pFile, pBuf, bufLen);
|
int64_t len = taosReadFile(pRaftCfgIndex->pFile, pBuf, bufLen);
|
||||||
ASSERT(len > 0);
|
ASSERT(len > 0);
|
||||||
|
@ -93,7 +93,7 @@ cJSON *raftCfgIndex2Json(SRaftCfgIndex *pRaftCfgIndex) {
|
||||||
|
|
||||||
char *raftCfgIndex2Str(SRaftCfgIndex *pRaftCfgIndex) {
|
char *raftCfgIndex2Str(SRaftCfgIndex *pRaftCfgIndex) {
|
||||||
cJSON *pJson = raftCfgIndex2Json(pRaftCfgIndex);
|
cJSON *pJson = raftCfgIndex2Json(pRaftCfgIndex);
|
||||||
char * serialized = cJSON_Print(pJson);
|
char *serialized = cJSON_Print(pJson);
|
||||||
cJSON_Delete(pJson);
|
cJSON_Delete(pJson);
|
||||||
return serialized;
|
return serialized;
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ int32_t raftCfgIndexCreateFile(const char *path) {
|
||||||
raftCfgIndex.configIndexCount = 1;
|
raftCfgIndex.configIndexCount = 1;
|
||||||
raftCfgIndex.configIndexArr[0] = -1;
|
raftCfgIndex.configIndexArr[0] = -1;
|
||||||
|
|
||||||
char * s = raftCfgIndex2Str(&raftCfgIndex);
|
char *s = raftCfgIndex2Str(&raftCfgIndex);
|
||||||
int64_t ret = taosWriteFile(pFile, s, strlen(s) + 1);
|
int64_t ret = taosWriteFile(pFile, s, strlen(s) + 1);
|
||||||
ASSERT(ret == strlen(s) + 1);
|
ASSERT(ret == strlen(s) + 1);
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ cJSON *syncCfg2Json(SSyncCfg *pSyncCfg) {
|
||||||
|
|
||||||
char *syncCfg2Str(SSyncCfg *pSyncCfg) {
|
char *syncCfg2Str(SSyncCfg *pSyncCfg) {
|
||||||
cJSON *pJson = syncCfg2Json(pSyncCfg);
|
cJSON *pJson = syncCfg2Json(pSyncCfg);
|
||||||
char * serialized = cJSON_Print(pJson);
|
char *serialized = cJSON_Print(pJson);
|
||||||
cJSON_Delete(pJson);
|
cJSON_Delete(pJson);
|
||||||
return serialized;
|
return serialized;
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,7 @@ char *syncCfg2Str(SSyncCfg *pSyncCfg) {
|
||||||
char *syncCfg2SimpleStr(SSyncCfg *pSyncCfg) {
|
char *syncCfg2SimpleStr(SSyncCfg *pSyncCfg) {
|
||||||
if (pSyncCfg != NULL) {
|
if (pSyncCfg != NULL) {
|
||||||
int32_t len = 512;
|
int32_t len = 512;
|
||||||
char * s = taosMemoryMalloc(len);
|
char *s = taosMemoryMalloc(len);
|
||||||
memset(s, 0, len);
|
memset(s, 0, len);
|
||||||
|
|
||||||
snprintf(s, len, "{r-num:%d, my:%d, ", pSyncCfg->replicaNum, pSyncCfg->myIndex);
|
snprintf(s, len, "{r-num:%d, my:%d, ", pSyncCfg->replicaNum, pSyncCfg->myIndex);
|
||||||
|
@ -349,7 +349,7 @@ cJSON *raftCfg2Json(SRaftCfg *pRaftCfg) {
|
||||||
|
|
||||||
char *raftCfg2Str(SRaftCfg *pRaftCfg) {
|
char *raftCfg2Str(SRaftCfg *pRaftCfg) {
|
||||||
cJSON *pJson = raftCfg2Json(pRaftCfg);
|
cJSON *pJson = raftCfg2Json(pRaftCfg);
|
||||||
char * serialized = cJSON_Print(pJson);
|
char *serialized = cJSON_Print(pJson);
|
||||||
cJSON_Delete(pJson);
|
cJSON_Delete(pJson);
|
||||||
return serialized;
|
return serialized;
|
||||||
}
|
}
|
||||||
|
@ -426,7 +426,7 @@ int32_t raftCfgFromJson(const cJSON *pRoot, SRaftCfg *pRaftCfg) {
|
||||||
(pRaftCfg->configIndexArr)[i] = atoll(pIndex->valuestring);
|
(pRaftCfg->configIndexArr)[i] = atoll(pIndex->valuestring);
|
||||||
}
|
}
|
||||||
|
|
||||||
cJSON * pJsonSyncCfg = cJSON_GetObjectItem(pJson, "SSyncCfg");
|
cJSON *pJsonSyncCfg = cJSON_GetObjectItem(pJson, "SSyncCfg");
|
||||||
int32_t code = syncCfgFromJson(pJsonSyncCfg, &(pRaftCfg->cfg));
|
int32_t code = syncCfgFromJson(pJsonSyncCfg, &(pRaftCfg->cfg));
|
||||||
ASSERT(code == 0);
|
ASSERT(code == 0);
|
||||||
|
|
||||||
|
@ -447,85 +447,85 @@ int32_t raftCfgFromStr(const char *s, SRaftCfg *pRaftCfg) {
|
||||||
// for debug ----------------------
|
// for debug ----------------------
|
||||||
void syncCfgPrint(SSyncCfg *pCfg) {
|
void syncCfgPrint(SSyncCfg *pCfg) {
|
||||||
char *serialized = syncCfg2Str(pCfg);
|
char *serialized = syncCfg2Str(pCfg);
|
||||||
printf("syncCfgPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("syncCfgPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncCfgPrint2(char *s, SSyncCfg *pCfg) {
|
void syncCfgPrint2(char *s, SSyncCfg *pCfg) {
|
||||||
char *serialized = syncCfg2Str(pCfg);
|
char *serialized = syncCfg2Str(pCfg);
|
||||||
printf("syncCfgPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("syncCfgPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncCfgLog(SSyncCfg *pCfg) {
|
void syncCfgLog(SSyncCfg *pCfg) {
|
||||||
char *serialized = syncCfg2Str(pCfg);
|
char *serialized = syncCfg2Str(pCfg);
|
||||||
sTrace("syncCfgLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("syncCfgLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncCfgLog2(char *s, SSyncCfg *pCfg) {
|
void syncCfgLog2(char *s, SSyncCfg *pCfg) {
|
||||||
char *serialized = syncCfg2Str(pCfg);
|
char *serialized = syncCfg2Str(pCfg);
|
||||||
sTrace("syncCfgLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncCfgLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void syncCfgLog3(char *s, SSyncCfg *pCfg) {
|
void syncCfgLog3(char *s, SSyncCfg *pCfg) {
|
||||||
char *serialized = syncCfg2SimpleStr(pCfg);
|
char *serialized = syncCfg2SimpleStr(pCfg);
|
||||||
sTrace("syncCfgLog3 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("syncCfgLog3 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCfgPrint(SRaftCfg *pCfg) {
|
void raftCfgPrint(SRaftCfg *pCfg) {
|
||||||
char *serialized = raftCfg2Str(pCfg);
|
char *serialized = raftCfg2Str(pCfg);
|
||||||
printf("raftCfgPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("raftCfgPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCfgPrint2(char *s, SRaftCfg *pCfg) {
|
void raftCfgPrint2(char *s, SRaftCfg *pCfg) {
|
||||||
char *serialized = raftCfg2Str(pCfg);
|
char *serialized = raftCfg2Str(pCfg);
|
||||||
printf("raftCfgPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("raftCfgPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCfgLog(SRaftCfg *pCfg) {
|
void raftCfgLog(SRaftCfg *pCfg) {
|
||||||
char *serialized = raftCfg2Str(pCfg);
|
char *serialized = raftCfg2Str(pCfg);
|
||||||
sTrace("raftCfgLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("raftCfgLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCfgLog2(char *s, SRaftCfg *pCfg) {
|
void raftCfgLog2(char *s, SRaftCfg *pCfg) {
|
||||||
char *serialized = raftCfg2Str(pCfg);
|
char *serialized = raftCfg2Str(pCfg);
|
||||||
sTrace("raftCfgLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("raftCfgLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------
|
// ---------
|
||||||
void raftCfgIndexPrint(SRaftCfgIndex *pCfg) {
|
void raftCfgIndexPrint(SRaftCfgIndex *pCfg) {
|
||||||
char *serialized = raftCfgIndex2Str(pCfg);
|
char *serialized = raftCfgIndex2Str(pCfg);
|
||||||
printf("raftCfgIndexPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("raftCfgIndexPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCfgIndexPrint2(char *s, SRaftCfgIndex *pCfg) {
|
void raftCfgIndexPrint2(char *s, SRaftCfgIndex *pCfg) {
|
||||||
char *serialized = raftCfgIndex2Str(pCfg);
|
char *serialized = raftCfgIndex2Str(pCfg);
|
||||||
printf("raftCfgIndexPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("raftCfgIndexPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCfgIndexLog(SRaftCfgIndex *pCfg) {
|
void raftCfgIndexLog(SRaftCfgIndex *pCfg) {
|
||||||
char *serialized = raftCfgIndex2Str(pCfg);
|
char *serialized = raftCfgIndex2Str(pCfg);
|
||||||
sTrace("raftCfgIndexLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("raftCfgIndexLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCfgIndexLog2(char *s, SRaftCfgIndex *pCfg) {
|
void raftCfgIndexLog2(char *s, SRaftCfgIndex *pCfg) {
|
||||||
char *serialized = raftCfgIndex2Str(pCfg);
|
char *serialized = raftCfgIndex2Str(pCfg);
|
||||||
sTrace("raftCfgIndexLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("raftCfgIndexLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
|
@ -418,28 +418,28 @@ char* raftCache2Str(SRaftEntryHashCache* pCache) {
|
||||||
|
|
||||||
void raftCachePrint(SRaftEntryHashCache* pCache) {
|
void raftCachePrint(SRaftEntryHashCache* pCache) {
|
||||||
char* serialized = raftCache2Str(pCache);
|
char* serialized = raftCache2Str(pCache);
|
||||||
printf("raftCachePrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("raftCachePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCachePrint2(char* s, SRaftEntryHashCache* pCache) {
|
void raftCachePrint2(char* s, SRaftEntryHashCache* pCache) {
|
||||||
char* serialized = raftCache2Str(pCache);
|
char* serialized = raftCache2Str(pCache);
|
||||||
printf("raftCachePrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("raftCachePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCacheLog(SRaftEntryHashCache* pCache) {
|
void raftCacheLog(SRaftEntryHashCache* pCache) {
|
||||||
char* serialized = raftCache2Str(pCache);
|
char* serialized = raftCache2Str(pCache);
|
||||||
sTrace("raftCacheLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("raftCacheLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftCacheLog2(char* s, SRaftEntryHashCache* pCache) {
|
void raftCacheLog2(char* s, SRaftEntryHashCache* pCache) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = raftCache2Str(pCache);
|
char* serialized = raftCache2Str(pCache);
|
||||||
sTraceLong("raftCacheLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTraceLong("raftCacheLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -677,28 +677,28 @@ char* raftEntryCache2Str(SRaftEntryCache* pObj) {
|
||||||
|
|
||||||
void raftEntryCachePrint(SRaftEntryCache* pObj) {
|
void raftEntryCachePrint(SRaftEntryCache* pObj) {
|
||||||
char* serialized = raftEntryCache2Str(pObj);
|
char* serialized = raftEntryCache2Str(pObj);
|
||||||
printf("raftEntryCachePrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("raftEntryCachePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftEntryCachePrint2(char* s, SRaftEntryCache* pObj) {
|
void raftEntryCachePrint2(char* s, SRaftEntryCache* pObj) {
|
||||||
char* serialized = raftEntryCache2Str(pObj);
|
char* serialized = raftEntryCache2Str(pObj);
|
||||||
printf("raftEntryCachePrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("raftEntryCachePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftEntryCacheLog(SRaftEntryCache* pObj) {
|
void raftEntryCacheLog(SRaftEntryCache* pObj) {
|
||||||
char* serialized = raftEntryCache2Str(pObj);
|
char* serialized = raftEntryCache2Str(pObj);
|
||||||
sTrace("raftEntryCacheLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("raftEntryCacheLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftEntryCacheLog2(char* s, SRaftEntryCache* pObj) {
|
void raftEntryCacheLog2(char* s, SRaftEntryCache* pObj) {
|
||||||
if (gRaftDetailLog) {
|
if (gRaftDetailLog) {
|
||||||
char* serialized = raftEntryCache2Str(pObj);
|
char* serialized = raftEntryCache2Str(pObj);
|
||||||
sTraceLong("raftEntryCacheLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTraceLong("raftEntryCacheLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,25 +226,25 @@ char *raftStore2Str(SRaftStore *pRaftStore) {
|
||||||
// for debug -------------------
|
// for debug -------------------
|
||||||
void raftStorePrint(SRaftStore *pObj) {
|
void raftStorePrint(SRaftStore *pObj) {
|
||||||
char *serialized = raftStore2Str(pObj);
|
char *serialized = raftStore2Str(pObj);
|
||||||
printf("raftStorePrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("raftStorePrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftStorePrint2(char *s, SRaftStore *pObj) {
|
void raftStorePrint2(char *s, SRaftStore *pObj) {
|
||||||
char *serialized = raftStore2Str(pObj);
|
char *serialized = raftStore2Str(pObj);
|
||||||
printf("raftStorePrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("raftStorePrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
void raftStoreLog(SRaftStore *pObj) {
|
void raftStoreLog(SRaftStore *pObj) {
|
||||||
char *serialized = raftStore2Str(pObj);
|
char *serialized = raftStore2Str(pObj);
|
||||||
sTrace("raftStoreLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("raftStoreLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void raftStoreLog2(char *s, SRaftStore *pObj) {
|
void raftStoreLog2(char *s, SRaftStore *pObj) {
|
||||||
char *serialized = raftStore2Str(pObj);
|
char *serialized = raftStore2Str(pObj);
|
||||||
sTrace("raftStoreLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("raftStoreLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,27 +138,27 @@ char *voteGranted2Str(SVotesGranted *pVotesGranted) {
|
||||||
// for debug -------------------
|
// for debug -------------------
|
||||||
void voteGrantedPrint(SVotesGranted *pObj) {
|
void voteGrantedPrint(SVotesGranted *pObj) {
|
||||||
char *serialized = voteGranted2Str(pObj);
|
char *serialized = voteGranted2Str(pObj);
|
||||||
printf("voteGrantedPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("voteGrantedPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void voteGrantedPrint2(char *s, SVotesGranted *pObj) {
|
void voteGrantedPrint2(char *s, SVotesGranted *pObj) {
|
||||||
char *serialized = voteGranted2Str(pObj);
|
char *serialized = voteGranted2Str(pObj);
|
||||||
printf("voteGrantedPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("voteGrantedPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void voteGrantedLog(SVotesGranted *pObj) {
|
void voteGrantedLog(SVotesGranted *pObj) {
|
||||||
char *serialized = voteGranted2Str(pObj);
|
char *serialized = voteGranted2Str(pObj);
|
||||||
sTrace("voteGrantedLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("voteGrantedLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void voteGrantedLog2(char *s, SVotesGranted *pObj) {
|
void voteGrantedLog2(char *s, SVotesGranted *pObj) {
|
||||||
char *serialized = voteGranted2Str(pObj);
|
char *serialized = voteGranted2Str(pObj);
|
||||||
sTrace("voteGrantedLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("voteGrantedLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,26 +267,26 @@ char *votesRespond2Str(SVotesRespond *pVotesRespond) {
|
||||||
// for debug -------------------
|
// for debug -------------------
|
||||||
void votesRespondPrint(SVotesRespond *pObj) {
|
void votesRespondPrint(SVotesRespond *pObj) {
|
||||||
char *serialized = votesRespond2Str(pObj);
|
char *serialized = votesRespond2Str(pObj);
|
||||||
printf("votesRespondPrint | len:%lu | %s \n", strlen(serialized), serialized);
|
printf("votesRespondPrint | len:%" PRIu64 " | %s \n", strlen(serialized), serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void votesRespondPrint2(char *s, SVotesRespond *pObj) {
|
void votesRespondPrint2(char *s, SVotesRespond *pObj) {
|
||||||
char *serialized = votesRespond2Str(pObj);
|
char *serialized = votesRespond2Str(pObj);
|
||||||
printf("votesRespondPrint2 | len:%lu | %s | %s \n", strlen(serialized), s, serialized);
|
printf("votesRespondPrint2 | len:%" PRIu64 " | %s | %s \n", strlen(serialized), s, serialized);
|
||||||
fflush(NULL);
|
fflush(NULL);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void votesRespondLog(SVotesRespond *pObj) {
|
void votesRespondLog(SVotesRespond *pObj) {
|
||||||
char *serialized = votesRespond2Str(pObj);
|
char *serialized = votesRespond2Str(pObj);
|
||||||
sTrace("votesRespondLog | len:%lu | %s", strlen(serialized), serialized);
|
sTrace("votesRespondLog | len:%" PRIu64 " | %s", strlen(serialized), serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
void votesRespondLog2(char *s, SVotesRespond *pObj) {
|
void votesRespondLog2(char *s, SVotesRespond *pObj) {
|
||||||
char *serialized = votesRespond2Str(pObj);
|
char *serialized = votesRespond2Str(pObj);
|
||||||
sTrace("votesRespondLog2 | len:%lu | %s | %s", strlen(serialized), s, serialized);
|
sTrace("votesRespondLog2 | len:%" PRIu64 " | %s | %s", strlen(serialized), s, serialized);
|
||||||
taosMemoryFree(serialized);
|
taosMemoryFree(serialized);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue