diff --git a/source/libs/sync/inc/syncRaftEntry.h b/source/libs/sync/inc/syncRaftEntry.h index fdfabf12a3820d332b2404592a2f104a90fb76b6..607ff4ba24cae3ef1985e84a58bb0de44d8fbec4 100644 --- a/source/libs/sync/inc/syncRaftEntry.h +++ b/source/libs/sync/inc/syncRaftEntry.h @@ -36,6 +36,7 @@ typedef struct SSyncRaftEntry { bool isWeak; SyncTerm term; SyncIndex index; + int64_t rid; uint32_t dataLen; // origin RpcMsg.contLen char data[]; // origin RpcMsg.pCont } SSyncRaftEntry; diff --git a/source/libs/sync/src/syncRaftEntry.c b/source/libs/sync/src/syncRaftEntry.c index 89e67fab288b5a2a0594829b6a39b27bdf698c44..64cff4d93d710a600ca2a2bf34d329f296477fa9 100644 --- a/source/libs/sync/src/syncRaftEntry.c +++ b/source/libs/sync/src/syncRaftEntry.c @@ -137,6 +137,8 @@ cJSON* syncEntry2Json(const SSyncRaftEntry* pEntry) { cJSON_AddStringToObject(pRoot, "term", u64buf); snprintf(u64buf, sizeof(u64buf), "%" PRIu64, pEntry->index); cJSON_AddStringToObject(pRoot, "index", u64buf); + snprintf(u64buf, sizeof(u64buf), "%" PRIu64, pEntry->rid); + cJSON_AddStringToObject(pRoot, "rid", u64buf); cJSON_AddNumberToObject(pRoot, "dataLen", pEntry->dataLen); char* s;