refactor: make logStoreGetLastEntry static
This commit is contained in:
parent
d45221c863
commit
5471792549
|
@ -41,12 +41,14 @@ SyncIndex logStoreLastIndex(SSyncLogStore* pLogStore);
|
||||||
SyncTerm logStoreLastTerm(SSyncLogStore* pLogStore);
|
SyncTerm logStoreLastTerm(SSyncLogStore* pLogStore);
|
||||||
int32_t logStoreUpdateCommitIndex(SSyncLogStore* pLogStore, SyncIndex index);
|
int32_t logStoreUpdateCommitIndex(SSyncLogStore* pLogStore, SyncIndex index);
|
||||||
SyncIndex logStoreGetCommitIndex(SSyncLogStore* pLogStore);
|
SyncIndex logStoreGetCommitIndex(SSyncLogStore* pLogStore);
|
||||||
SSyncRaftEntry* logStoreGetLastEntry(SSyncLogStore* pLogStore);
|
|
||||||
cJSON* logStore2Json(SSyncLogStore* pLogStore);
|
cJSON* logStore2Json(SSyncLogStore* pLogStore);
|
||||||
char* logStore2Str(SSyncLogStore* pLogStore);
|
char* logStore2Str(SSyncLogStore* pLogStore);
|
||||||
cJSON* logStoreSimple2Json(SSyncLogStore* pLogStore);
|
cJSON* logStoreSimple2Json(SSyncLogStore* pLogStore);
|
||||||
char* logStoreSimple2Str(SSyncLogStore* pLogStore);
|
char* logStoreSimple2Str(SSyncLogStore* pLogStore);
|
||||||
|
|
||||||
|
// SSyncRaftEntry* logStoreGetLastEntry(SSyncLogStore* pLogStore);
|
||||||
|
|
||||||
// for debug
|
// for debug
|
||||||
void logStorePrint(SSyncLogStore* pLogStore);
|
void logStorePrint(SSyncLogStore* pLogStore);
|
||||||
void logStorePrint2(char* s, SSyncLogStore* pLogStore);
|
void logStorePrint2(char* s, SSyncLogStore* pLogStore);
|
||||||
|
|
|
@ -16,6 +16,9 @@
|
||||||
#include "syncRaftLog.h"
|
#include "syncRaftLog.h"
|
||||||
#include "wal.h"
|
#include "wal.h"
|
||||||
|
|
||||||
|
static SSyncRaftEntry* logStoreGetLastEntry(SSyncLogStore* pLogStore);
|
||||||
|
|
||||||
|
|
||||||
SSyncLogStore* logStoreCreate(SSyncNode* pSyncNode) {
|
SSyncLogStore* logStoreCreate(SSyncNode* pSyncNode) {
|
||||||
SSyncLogStore* pLogStore = taosMemoryMalloc(sizeof(SSyncLogStore));
|
SSyncLogStore* pLogStore = taosMemoryMalloc(sizeof(SSyncLogStore));
|
||||||
assert(pLogStore != NULL);
|
assert(pLogStore != NULL);
|
||||||
|
|
Loading…
Reference in New Issue